summaryrefslogtreecommitdiff
path: root/gfx/thebes/gfxFontUtils.cpp
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-05-02 20:28:36 +0000
committerMoonchild <moonchild@palemoon.org>2021-05-02 20:28:36 +0000
commit616b39413d570fd98a9a300483a3b657a00fa43b (patch)
tree8398d6fb6f9a491c871532e91aaf84ef1b50d1c7 /gfx/thebes/gfxFontUtils.cpp
parentcd1f7241353c35627672dc3f6f73eb8bbd5f4925 (diff)
downloaduxp-616b39413d570fd98a9a300483a3b657a00fa43b.tar.gz
Issue #1751 -- Remove XP_MACOSX conditionals and support files from /gfx
Diffstat (limited to 'gfx/thebes/gfxFontUtils.cpp')
-rw-r--r--gfx/thebes/gfxFontUtils.cpp41
1 files changed, 5 insertions, 36 deletions
diff --git a/gfx/thebes/gfxFontUtils.cpp b/gfx/thebes/gfxFontUtils.cpp
index 54ca03ff6c..0d4b309f6c 100644
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -379,24 +379,14 @@ gfxFontUtils::ReadCMAPTableFormat14(const uint8_t *aBuf, uint32_t aLength,
return NS_OK;
}
-// For fonts with two format-4 tables, the first one (Unicode platform) is preferred on the Mac;
-// on other platforms we allow the Microsoft-platform subtable to replace it.
+// For fonts with two format-4 tables, we allow the first one (Unicode platform)
+// to be replaced by the Microsoft-platform subtable.
-#if defined(XP_MACOSX)
- #define acceptableFormat4(p,e,k) (((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDMicrosoft && !(k)) || \
- ((p) == PLATFORM_ID_UNICODE))
+#define acceptableFormat4(p,e,k) (((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDMicrosoft) || \
+ ((p) == PLATFORM_ID_UNICODE))
- #define acceptableUCS4Encoding(p, e, k) \
- (((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDUCS4ForMicrosoftPlatform) && (k) != 12 || \
- ((p) == PLATFORM_ID_UNICODE && \
- ((e) != EncodingIDUVSForUnicodePlatform)))
-#else
- #define acceptableFormat4(p,e,k) (((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDMicrosoft) || \
- ((p) == PLATFORM_ID_UNICODE))
-
- #define acceptableUCS4Encoding(p, e, k) \
+#define acceptableUCS4Encoding(p, e, k) \
((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDUCS4ForMicrosoftPlatform)
-#endif
#define acceptablePlatform(p) ((p) == PLATFORM_ID_UNICODE || (p) == PLATFORM_ID_MICROSOFT)
#define isSymbol(p,e) ((p) == PLATFORM_ID_MICROSOFT && (e) == EncodingIDSymbol)
@@ -1230,13 +1220,8 @@ gfxFontUtils::GetFamilyNameFromTable(hb_blob_t *aNameTable,
}
enum {
-#if defined(XP_MACOSX)
- CANONICAL_LANG_ID = gfxFontUtils::LANG_ID_MAC_ENGLISH,
- PLATFORM_ID = gfxFontUtils::PLATFORM_ID_MAC
-#else
CANONICAL_LANG_ID = gfxFontUtils::LANG_ID_MICROSOFT_EN_US,
PLATFORM_ID = gfxFontUtils::PLATFORM_ID_MICROSOFT
-#endif
};
nsresult
@@ -1277,22 +1262,6 @@ gfxFontUtils::ReadCanonicalName(const char *aNameData, uint32_t aDataLen,
NS_ENSURE_SUCCESS(rv, rv);
}
-#if defined(XP_MACOSX)
- // may be dealing with font that only has Microsoft name entries
- if (names.Length() == 0) {
- rv = ReadNames(aNameData, aDataLen, aNameID, LANG_ID_MICROSOFT_EN_US,
- PLATFORM_ID_MICROSOFT, names);
- NS_ENSURE_SUCCESS(rv, rv);
-
- // getting really desperate now, take anything!
- if (names.Length() == 0) {
- rv = ReadNames(aNameData, aDataLen, aNameID, LANG_ALL,
- PLATFORM_ID_MICROSOFT, names);
- NS_ENSURE_SUCCESS(rv, rv);
- }
- }
-#endif
-
// return the first name (99.9% of the time names will
// contain a single English name)
if (names.Length()) {