ref: f3050059dd18c2efe6dc455bbf86a2405f4959cc
parent: 36d2eab05468d531cf8f51dce4cbca27e553b672
author: David Turner <[email protected]>
date: Mon Sep 11 08:00:32 EDT 2006
* src/sfnt/sfobjs.c (tt_face_get_name): support some function which report their English names through an Apple Roman (platform,encoding) pair, with language_id != English if the font uses another name entry with language_id == English, it will be selected correctly though. * src/truetype/ttobjs.c: add unpatent-hinting selection for "mingli.ttf"
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-09-11 David Turner <[email protected]>
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): support some function
+ which report their English names through an Apple Roman
+ (platform,encoding) pair, with language_id != English
+
+ if the font uses another name entry with language_id == English,
+ it will be selected correctly though.
+
+ * src/truetype/ttobjs.c: add unpatent-hinting selection for
+ "mingli.ttf"
+
2006-09-05 Werner Lemberg <[email protected]>
* src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size'
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -165,9 +165,11 @@
FT_String* result = NULL;
FT_UShort n;
TT_NameEntryRec* rec;
- FT_Int found_apple = -1;
- FT_Int found_win = -1;
- FT_Int found_unicode = -1;
+ FT_Int found_apple = -1;
+ FT_Int found_apple_roman = -1;
+ FT_Int found_apple_english = -1;
+ FT_Int found_win = -1;
+ FT_Int found_unicode = -1;
FT_Bool is_english = 0;
@@ -200,8 +202,14 @@
break;
case TT_PLATFORM_MACINTOSH:
+ /* This is a bit special, because some fonts will use either
+ * an English language id, or a Roman encoding id, to indicate
+ * the English version of their font name
+ */
if ( rec->languageID == TT_MAC_LANGID_ENGLISH )
- found_apple = n;
+ found_apple_english = n;
+ else if ( rec->encodingID == TT_MAC_ID_ROMAN )
+ found_apple_roman = n;
break;
@@ -231,6 +239,10 @@
}
}
}
+
+ found_apple = found_apple_roman;
+ if ( found_apple_english >= 0 )
+ found_apple = found_apple_english;
/* some fonts contain invalid Unicode or Macintosh formatted entries; */
/* we will thus favor names encoded in Windows formats if available */
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -272,6 +272,7 @@
"HuaTianSongTi?", /* htst3.ttf */
"MingLiU", /* mingliu.ttf & mingliu.ttc */
"PMingLiU", /* mingliu.ttc */
+ "MingLi43", /* mingli.ttf */
NULL
};
int nn;