mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 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.
This commit is contained in:
11
font.c
11
font.c
@@ -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();
|
||||
|
Reference in New Issue
Block a user