X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpango-font.cc;h=b805f34a8541eeb594f51f1aced0633f4c3dcf0e;hb=ff3e029f198c72d88c1c2fd2db3ce12cce86e725;hp=fcdf958cef2ff3c5c1737c33765aa2de1e60d574;hpb=e8d5061834a5a658c5ffd078237e9cd660069a7d;p=lilypond.git diff --git a/lily/pango-font.cc b/lily/pango-font.cc index fcdf958cef..b805f34a85 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -35,11 +35,13 @@ #include "file-name.hh" #include "international.hh" #include "lookup.hh" // debugging +#include "ly-module.hh" #include "main.hh" #include "string-convert.hh" #include "warn.hh" #include "all-font-metrics.hh" #include "program-option.hh" +#include "open-type-font.hh" #if HAVE_PANGO_FT2 #include "stencil.hh" @@ -199,7 +201,7 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const b.scale (scale_); - char const *ps_name_str0 = FT_Get_Postscript_Name (ftface); + const string ps_name_str0 = get_postscript_name (ftface); FcPattern *fcpat = fcfont->font_pattern; FcChar8 *file_name_as_ptr = 0; @@ -319,11 +321,11 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const Real size = pango_font_description_get_size (descr) / (Real (PANGO_SCALE)); - if (!ps_name_str0) + if (ps_name_str0.empty ()) warning (_f ("no PostScript font name for font `%s'", file_name)); string ps_name; - if (!ps_name_str0 + if (ps_name_str0.empty () && file_name != "" && (file_name.find (".otf") != NPOS || file_name.find (".cff") != NPOS)) @@ -350,7 +352,7 @@ Pango_font::pango_item_string_stencil (PangoGlyphItem const *glyph_item) const name = String_convert::to_lower (name); ps_name = initial + name; } - else if (ps_name_str0) + else if (!ps_name_str0.empty ()) ps_name = ps_name_str0; if (ps_name.length ())