summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2008-03-01 10:21:12 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2008-03-01 10:21:12 +0100
commit3bd7f7a0e02ad805c161ac616bc2adcdb429350b (patch)
tree6fa064655cab5ca9ce53a0f06ee1b9057abe2652
parentde5e737027413b4015ca2ebce45811544927b5f3 (diff)
downloadvdr-3bd7f7a0e02ad805c161ac616bc2adcdb429350b.tar.gz
vdr-3bd7f7a0e02ad805c161ac616bc2adcdb429350b.tar.bz2
Rendering the non-breaking space symbol as a blank
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--font.c8
3 files changed, 8 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 5de85c84..9287677c 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -2103,6 +2103,7 @@ Tobias Grimm <tobias.grimm@e-tobi.net>
for fixing a crash in cFreetypeFont::DrawText() if an unknown symbol is encountered
for suggesting that the 'plugins' target in the Makefile should return an error exit
code if one of the plugins failed to compile
+ for making the non-breaking space symbol be rendered as a blank
Helge Lenz <h.lenz@gmx.de>
for reporting a bug in setting the 'Delta' parameter when calling the shutdown
diff --git a/HISTORY b/HISTORY
index 77e51474..5390025a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -5689,3 +5689,4 @@ Video Disk Recorder Revision History
- 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).
diff --git a/font.c b/font.c
index 7e52a5f5..b458e890 100644
--- a/font.c
+++ b/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.24 2008/02/29 13:35:15 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)) {
@@ -216,7 +220,7 @@ cGlyph* cFreetypeFont::Glyph(uint CharCode, bool AntiAliased) const
}
#define UNKNOWN_GLYPH_INDICATOR '?'
if (CharCode != UNKNOWN_GLYPH_INDICATOR)
- return Glyph(UNKNOWN_GLYPH_INDICATOR);
+ return Glyph(UNKNOWN_GLYPH_INDICATOR, AntiAliased);
return NULL;
}