diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-03-02 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2008-03-02 18:00:00 +0100 |
commit | 0872cba0a10c1350e6f694ea2296947428a97326 (patch) | |
tree | 7e11b8528d8ad64b94331acdc1074eaf84e64382 /font.c | |
parent | 83d7a4b7838a8209c05c53b5e625bf965d3bf585 (diff) | |
download | vdr-patch-lnbsharing-0872cba0a10c1350e6f694ea2296947428a97326.tar.gz vdr-patch-lnbsharing-0872cba0a10c1350e6f694ea2296947428a97326.tar.bz2 |
Version 1.5.17vdr-1.5.17
- Updated the Swedish OSD texts (thanks to Tomas Berglund).
- Made the 'pic2mpg' script of the 'pictures' plugin work with uppercase filename
extensions and relative paths (thanks to Stefan Wagner for reporting this one).
- Updated the Romanian OSD texts (thanks to Lucian Muresan).
- Updated the Dutch OSD texts (thanks to Johan Schuring).
- Stripping control codes 0x86 and 0x87 from SI strings.
- Updated French language texts (thanks to Jean-Claude Repetto).
- Fixed handling 3 and 4 byte UTF-8 symbols in Utf8CharGet() (thanks to Andreas
Mair).
- Fixed a crash in cFreetypeFont::DrawText() if an unknown symbol is encountered
(thanks to Tobias Grimm). Unknown symbols are replaced with a '?'.
- Updated the Slovenian OSD texts (thanks to Matjaz Thaler).
- Updated the Czech OSD texts (thanks to Vladimír Bárta and Jiri Dobry).
- Updated the Turkish OSD texts (thanks to Oktay Yolgeçen).
- The 'plugins' target in the Makefile now returns an error exit code if one of the
plugins failed to compile (suggested by Tobias Grimm).
- Rendering the non-breaking space symbol as a blank (thanks to Tobias Grimm).
- Changed the default character set for SI data from ISO6937 (as required by the DVB
standard ETSI EN 300 468) to ISO-8859-9, in order to work around the stupidity of
some providers, who actually use ISO-8859-9, but fail to correctly announce that.
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: font.c 1.23 2008/02/09 11:52:25 kls Exp $ + * $Id: font.c 1.25 2008/03/01 10:19:41 kls Exp $ */ #include "font.h" @@ -184,6 +184,10 @@ int cFreetypeFont::Kerning(cGlyph *Glyph, uint PrevSym) const cGlyph* cFreetypeFont::Glyph(uint CharCode, bool AntiAliased) const { + // Non-breaking space: + if (CharCode == 0xA0) + CharCode = 0x20; + // Lookup in cache: cList<cGlyph> *glyphCache = AntiAliased ? &glyphCacheAntiAliased : &glyphCacheMonochrome; for (cGlyph *g = glyphCache->First(); g; g = glyphCache->Next(g)) { @@ -214,6 +218,9 @@ cGlyph* cFreetypeFont::Glyph(uint CharCode, bool AntiAliased) const return Glyph; } } +#define UNKNOWN_GLYPH_INDICATOR '?' + if (CharCode != UNKNOWN_GLYPH_INDICATOR) + return Glyph(UNKNOWN_GLYPH_INDICATOR, AntiAliased); return NULL; } @@ -258,6 +265,8 @@ void cFreetypeFont::DrawText(cBitmap *Bitmap, int x, int y, const char *s, tColo 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(); |