Index: core/fpdfapi/fpdf_font/fpdf_font_charset.cpp |
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp b/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp |
index 642efd62ca27085616485c50f4ece382660b38c6..1b503c69a6d98f4106d054b35640669c8a5adf0a 100644 |
--- a/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp |
+++ b/core/fpdfapi/fpdf_font/fpdf_font_charset.cpp |
@@ -9,7 +9,7 @@ |
#include "core/include/fxge/fx_freetype.h" |
static const struct _UnicodeAlt { |
- FX_WORD m_Unicode; |
+ uint16_t m_Unicode; |
const FX_CHAR* m_Alter; |
} UnicodeAlts[] = { |
{0x00a0, " "}, {0x00a1, "!"}, {0x00a2, "c"}, {0x00a3, "P"}, |
@@ -60,7 +60,7 @@ const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) { |
int end = sizeof UnicodeAlts / sizeof(struct _UnicodeAlt) - 1; |
while (begin <= end) { |
int middle = (begin + end) / 2; |
- FX_WORD middlecode = UnicodeAlts[middle].m_Unicode; |
+ uint16_t middlecode = UnicodeAlts[middle].m_Unicode; |
if (middlecode > unicode) { |
end = middle - 1; |
} else if (middlecode < unicode) { |
@@ -71,7 +71,7 @@ const FX_CHAR* FCS_GetAltStr(FX_WCHAR unicode) { |
} |
return NULL; |
} |
-static const FX_WORD StandardEncoding[256] = { |
+static const uint16_t StandardEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -101,7 +101,7 @@ static const FX_WORD StandardEncoding[256] = { |
0x0152, 0x00ba, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00e6, 0x0000, |
0x0000, 0x0000, 0x0131, 0x0000, 0x0000, 0x0142, 0x00f8, 0x0153, 0x00df, |
0x0000, 0x0000, 0x0000, 0x0000}; |
-static const FX_WORD MacRomanEncoding[256] = { |
+static const uint16_t MacRomanEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -131,7 +131,7 @@ static const FX_WORD MacRomanEncoding[256] = { |
0x00cd, 0x00ce, 0x00cf, 0x00cc, 0x00d3, 0x00d4, 0x0000, 0x00d2, 0x00da, |
0x00db, 0x00d9, 0x0131, 0x02c6, 0x02dc, 0x00af, 0x02d8, 0x02d9, 0x02da, |
0x00b8, 0x02dd, 0x02db, 0x02c7}; |
-static const FX_WORD AdobeWinAnsiEncoding[256] = { |
+static const uint16_t AdobeWinAnsiEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -161,7 +161,7 @@ static const FX_WORD AdobeWinAnsiEncoding[256] = { |
0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef, 0x00f0, 0x00f1, 0x00f2, |
0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7, 0x00f8, 0x00f9, 0x00fa, 0x00fb, |
0x00fc, 0x00fd, 0x00fe, 0x00ff}; |
-static const FX_WORD MacExpertEncoding[256] = { |
+static const uint16_t MacExpertEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -191,7 +191,7 @@ static const FX_WORD MacExpertEncoding[256] = { |
0xf6f2, 0xf6eb, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xf6ee, 0xf6fb, |
0xf6f4, 0xf7af, 0xf6ea, 0x207f, 0xf6ef, 0xf6e2, 0xf6e8, 0xf6f7, 0xf6fc, |
0x0000, 0x0000, 0x0000, 0x0000}; |
-static const FX_WORD AdobeSymbolEncoding[256] = { |
+static const uint16_t AdobeSymbolEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -222,7 +222,7 @@ static const FX_WORD AdobeSymbolEncoding[256] = { |
0x2320, 0xF8F5, 0x2321, 0xF8F6, 0xF8F7, 0xF8F8, 0xF8F9, 0xF8FA, 0xF8FB, |
0xF8FC, 0xF8FD, 0xF8FE, 0x0000, |
}; |
-static const FX_WORD ZapfEncoding[256] = { |
+static const uint16_t ZapfEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -1677,7 +1677,7 @@ const FX_CHAR* PDF_CharNameFromPredefinedCharSet(int encoding, |
FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) { |
switch (encoding) { |
case FXFT_ENCODING_UNICODE: |
- return (FX_WORD)charcode; |
+ return (uint16_t)charcode; |
case FXFT_ENCODING_ADOBE_STANDARD: |
return StandardEncoding[(uint8_t)charcode]; |
case FXFT_ENCODING_ADOBE_EXPERT: |
@@ -1691,14 +1691,14 @@ FX_WCHAR FT_UnicodeFromCharCode(int encoding, FX_DWORD charcode) { |
} |
return 0; |
} |
-static FX_DWORD PDF_FindCode(const FX_WORD* pCodes, FX_WORD unicode) { |
+static FX_DWORD PDF_FindCode(const uint16_t* pCodes, uint16_t unicode) { |
for (FX_DWORD i = 0; i < 256; i++) |
if (pCodes[i] == unicode) { |
return i; |
} |
return 0; |
} |
-static const FX_WORD MSSymbolEncoding[256] = { |
+static const uint16_t MSSymbolEncoding[256] = { |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, |
@@ -1747,7 +1747,7 @@ FX_DWORD FT_CharCodeFromUnicode(int encoding, FX_WCHAR unicode) { |
} |
return 0; |
} |
-const FX_WORD* PDF_UnicodesForPredefinedCharSet(int encoding) { |
+const uint16_t* PDF_UnicodesForPredefinedCharSet(int encoding) { |
switch (encoding) { |
case PDFFONT_ENCODING_WINANSI: |
return AdobeWinAnsiEncoding; |