OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fxge/include/cfx_unicodeencodingex.h" | 7 #include "core/fxge/include/cfx_unicodeencodingex.h" |
8 | 8 |
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" | 9 #include "core/fpdfapi/fpdf_font/cpdf_font.h" |
10 #include "core/fxge/include/fx_font.h" | 10 #include "core/fxge/include/fx_font.h" |
11 #include "core/fxge/include/fx_freetype.h" | 11 #include "core/fxge/include/fx_freetype.h" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 const uint32_t g_EncodingID[] = { | 15 const uint32_t g_EncodingID[] = { |
16 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, | 16 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, |
17 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, | 17 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, |
18 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, | 18 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, |
19 FXFM_ENCODING_MS_JOHAB, FXFM_ENCODING_ADOBE_STANDARD, | 19 FXFM_ENCODING_MS_JOHAB, FXFM_ENCODING_ADOBE_STANDARD, |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 return FXFM_CreateFontEncoding(pFont, nEncodingID); | 89 return FXFM_CreateFontEncoding(pFont, nEncodingID); |
90 | 90 |
91 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { | 91 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { |
92 CFX_UnicodeEncodingEx* pFontEncoding = | 92 CFX_UnicodeEncodingEx* pFontEncoding = |
93 FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); | 93 FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); |
94 if (pFontEncoding) | 94 if (pFontEncoding) |
95 return pFontEncoding; | 95 return pFontEncoding; |
96 } | 96 } |
97 return nullptr; | 97 return nullptr; |
98 } | 98 } |
OLD | NEW |