summaryrefslogtreecommitdiff
path: root/librsvg
diff options
context:
space:
mode:
authorRamiro Estrugo <ramiro@src.gnome.org>2000-09-05 09:21:13 +0000
committerRamiro Estrugo <ramiro@src.gnome.org>2000-09-05 09:21:13 +0000
commitaf9196b5108cbf78e0ad78d8915eeb21110ec64a (patch)
treed3b4fc0946a88b0eb41c772ba332cabf5fc5c159 /librsvg
parent49d96a035a9b7dc029b2c10bd6ed84231ff2d5ea (diff)
downloadnautilus-af9196b5108cbf78e0ad78d8915eeb21110ec64a.tar.gz
Add a band aid fix for the unknown character problem when trying to index
* librsvg/rsvg-ft.c: (rsvg_ft_render_string): Add a band aid fix for the unknown character problem when trying to index glyphs from a font face. I filed a bug for this issue: 2775.
Diffstat (limited to 'librsvg')
-rw-r--r--librsvg/rsvg-ft.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/librsvg/rsvg-ft.c b/librsvg/rsvg-ft.c
index c035b71db..837df054d 100644
--- a/librsvg/rsvg-ft.c
+++ b/librsvg/rsvg-ft.c
@@ -662,6 +662,15 @@ rsvg_ft_render_string (RsvgFTCtx *ctx, RsvgFTFontHandle fh,
glyph_index = FT_Get_Char_Index (font->face,
((unsigned char *)str)[i]);
+ /* FIXME bugzilla.eazel.com 2775: Need a better way to deal
+ * with unknown characters.
+ *
+ * The following is just a band aid fix.
+ */
+ if (glyph_index == 0) {
+ glyph_index = FT_Get_Char_Index (font->face, '?');
+ }
+
if (last_glyph != 0 && glyph_index != 0) {
FT_Vector kern;
double kx, ky;