From 17d30dfd3abfe174e6eee4537537b638bd6c9f61 Mon Sep 17 00:00:00 2001 From: John Daggett Date: Fri, 15 Jan 2016 09:44:13 +0900 Subject: [PATCH] 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. --- gfx/thebes/gfxFontUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp index 044949a8d92..747f2911b4b 100644 --- a/gfx/thebes/gfxFontUtils.cpp +++ b/gfx/thebes/gfxFontUtils.cpp @@ -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)