From patchwork Fri Feb 29 22:01:24 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Grimm X-Patchwork-Id: 12617 Received: from moutng.kundenserver.de ([212.227.126.174]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1JVDIq-0006tm-Ih for vdr@linuxtv.org; Fri, 29 Feb 2008 23:02:04 +0100 Received: from [192.168.30.21] (erft-4db9e56b.pool.einsundeins.de [77.185.229.107]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1JVDIE0tud-0000OJ; Fri, 29 Feb 2008 23:01:26 +0100 Message-ID: <47C880B4.9080007@e-tobi.net> Date: Fri, 29 Feb 2008 23:01:24 +0100 From: Tobi User-Agent: Mozilla-Thunderbird 2.0.0.9 (X11/20080110) MIME-Version: 1.0 To: VDR Mailing List References: <47C74C01.40301@e-tobi.net> <47C808A2.4030602@cadsoft.de> <47C80A6F.3080406@cadsoft.de> In-Reply-To: <47C80A6F.3080406@cadsoft.de> X-Provags-ID: V01U2FsdGVkX18AYXZHWUHLwD619WaKmCcSW9rIO0FtZruIM/s 6QKFdFGNqQ8FONvAoztWfCuDq5EK5CWskOUFIh1h+wEUijCQ9H skTvHSRABzzN3JryIAvmXG6FBNybj33 Subject: Re: [vdr] vdr 1.5.16 - minor problem in font.c X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Feb 2008 22:02:04 -0000 Status: O X-Status: X-Keywords: X-UID: 15903 Klaus Schmidinger wrote: >> Can you please verify if the attached patch does this correctly? > Maybe the attached version is even better, because there are also other > places where Glyph() is called. The patch works, but you should also pass the AntiAliased parameter when recursivly calling Glyph(). Besides this - I have the 0xA0 about 80 times in my epg.data (very often on DMAX). As far as I can tell, the 0xA0 is used as NON-BREAKING SPACE to avoid the collapsing of two or more spaces. Therefore the 0xA0 might as well be rendered as normal single space by default: if (CharCode == 0xA0) CharCode = 0x20; Tobias diff -urNad vdr-1.5.16~/font.c vdr-1.5.16/font.c --- vdr-1.5.16~/font.c 2008-02-29 22:21:30.000000000 +0100 +++ vdr-1.5.16/font.c 2008-02-29 22:24:05.000000000 +0100 @@ -214,6 +214,9 @@ return Glyph; } } +#define UNKNOWN_GLYPH_INDICATOR '?' + if (CharCode != UNKNOWN_GLYPH_INDICATOR) + return Glyph(UNKNOWN_GLYPH_INDICATOR, AntiAliased); return NULL; } @@ -258,6 +261,8 @@ uint sym = Utf8CharGet(s, sl); s += sl; cGlyph *g = Glyph(sym, AntiAliased); + if (!g) + continue; int kerning = Kerning(g, prevSym); prevSym = sym; uchar *buffer = g->Bitmap();