Re: vdr 1.5.16 - minor problem in font.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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();
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux