Bug 1239603 - don't reject format 12 cmap with odd encoding. r=jfkthame

This fixes an issue affecting the use of Big Caslon under OSX which uses an improperly labeled format12 cmap with platform=0/encoding=1. Technically, a Unicode 1.1 encoding implies a font that's not entirely compatible with more recent versions of Unicode (e.g. Hangul range is different). But since this seems to be simply a font error and not a real problem for format12 cmaps, ignore this inconsistency.
This commit is contained in:
John Daggett 2016-01-15 09:44:13 +09:00
parent 3791d71d0d
commit 17d30dfd3a

View File

@ -388,7 +388,7 @@ gfxFontUtils::ReadCMAPTableFormat14(const uint8_t *aBuf, uint32_t aLength,
#define acceptableUCS4Encoding(p, e, k) \
(((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDUCS4ForMicrosoftPlatform) && (k) != 12 || \
((p) == PLATFORM_ID_UNICODE && \
((e) == EncodingIDDefaultForUnicodePlatform || (e) >= EncodingIDUCS4ForUnicodePlatform)))
((e) != EncodingIDUVSForUnicodePlatform)))
#else
#define acceptableFormat4(p,e,k) ((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDMicrosoft)