]> git.donarmstrong.com Git - lilypond.git/commitdiff
open_ft_face now handles font index.
authorWerner Lemberg <wl@gnu.org>
Tue, 23 Dec 2008 13:37:17 +0000 (14:37 +0100)
committerWerner Lemberg <wl@gnu.org>
Tue, 23 Dec 2008 13:37:17 +0000 (14:37 +0100)
lily/include/open-type-font.hh
lily/open-type-font.cc

index f79e4c07bad2857d252be697c278a5764485e1f5..8c85ea5efcb0c2996bb55111dc92484f42520bf0 100644 (file)
@@ -52,7 +52,7 @@ public:
 };
 
 string get_otf_table (FT_Face face, string tag);
-FT_Face open_ft_face (string str);
+FT_Face open_ft_face (string str, FT_Long idx = 0);
 
 
 #endif /* OPEN_TYPE_FONT_HH */
index 97c49feca2880936f5c173c1b685f3ad3491db2f..3bd52480a1e684f52215f337a9e3e04e3af4d50d 100644 (file)
@@ -91,18 +91,17 @@ get_otf_table (FT_Face face, string tag)
 }
 
 FT_Face
-open_ft_face (string str)
+open_ft_face (string str, FT_Long idx)
 {
   FT_Face face;
-  int error_code = FT_New_Face (freetype2_library, str.c_str (), 0, &face);
+  int error_code = FT_New_Face (freetype2_library, str.c_str (), idx, &face);
 
   if (error_code == FT_Err_Unknown_File_Format)
     error (_f ("unsupported font format: %s", str.c_str ()));
   else if (error_code)
     error (_f ("error reading font file %s: %s", 
               str.c_str (),
-              freetype_error_string (error_code).c_str ()
-              ));
+              freetype_error_string (error_code).c_str ()));
   return face;
 }