From 3c2fbb63c2b588dc244197ab7de7f028807833bb Mon Sep 17 00:00:00 2001 From: Masamichi Hosoda Date: Sat, 25 Jun 2016 11:12:11 +0900 Subject: [PATCH] Issue 4876/2: Enable fontname replacing in Open_type_font class This commit enables fontname replacing for CFF (OTF/OTC) fonts. --- lily/include/open-type-font.hh | 1 + lily/open-type-font.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lily/include/open-type-font.hh b/lily/include/open-type-font.hh index bf36071e91..b86a560a73 100644 --- a/lily/include/open-type-font.hh +++ b/lily/include/open-type-font.hh @@ -30,6 +30,7 @@ class Open_type_font : public Font_metric { /* handle to face object */ FT_Face face_; + string postscript_name_; SCM lily_subfonts_; SCM lily_character_table_; diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc index e4fb5d5d98..39e7b524ff 100644 --- a/lily/open-type-font.cc +++ b/lily/open-type-font.cc @@ -220,6 +220,8 @@ Open_type_font::Open_type_font (FT_Face face) index_to_charcode_map_ = make_index_to_charcode_map (face_); lily_index_to_bbox_table_ = scm_c_make_hash_table (257); + + postscript_name_ = get_postscript_name (face_); } void @@ -399,7 +401,7 @@ Open_type_font::get_global_table () const string Open_type_font::font_name () const { - return FT_Get_Postscript_Name (face_); + return postscript_name_; } SCM -- 2.39.2