From 4f80bf5bb55aa64f2e1c0c1588d8784627c73a21 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 1 Nov 2006 21:01:52 +0100 Subject: [PATCH] use glyph indexing for glyph name .notdef --- lily/pango-font.cc | 8 +++++--- lily/ttf.cc | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 7d50025c38..e075029154 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -178,12 +178,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, if (errorcode) programming_error ("FT_Get_Glyph_Name returns error"); } - + SCM char_id = SCM_EOL; if (glyph_name[0] == '\0' && cmap - - /* Ugh should ask FreeType about font type. */ && is_ttf && cmap->find (pg) != cmap->end ()) { @@ -200,6 +198,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, string str, continue; } + + if (glyph_name == string (".notdef") && is_ttf) + glyph_name[0] = '\0'; + if (glyph_name[0] == '\0' && is_ttf) { // access by glyph index directly. diff --git a/lily/ttf.cc b/lily/ttf.cc index 3c6370fd25..0e5526f8e1 100644 --- a/lily/ttf.cc +++ b/lily/ttf.cc @@ -180,6 +180,10 @@ print_trailer (void *out, get_unicode_name (glyph_name, ucode); } + if (glyph_name == string (".notdef")) + glyph_name[0] = '\0'; + + if (!glyph_name[0]) { get_glyph_index_name (glyph_name, i); -- 2.39.5