* 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"
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
diff --git a/ChangeLog b/ChangeLog
index 24ae9cf..a4a4d27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-09-11 David Turner <david@freetype.org>
+
+ * 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 <wl@gnu.org>
* src/truetype/ttpload.c (tt_face_load_hdmx): Handle `record_size'
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 869269c..d9c1cb4 100644
--- 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;
@@ -232,6 +240,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 */
/* (provided it is an English name) */
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 13eddf0..7241931 100644
--- 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;