OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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/fpdfapi/fpdf_font/include/cpdf_font.h" | 7 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" |
8 #include "core/fxge/ge/fx_text_int.h" | 8 #include "core/fxge/ge/fx_text_int.h" |
9 #include "core/include/fxge/fx_freetype.h" | 9 #include "core/fxge/include/fx_freetype.h" |
10 #include "core/include/fxge/fx_ge.h" | 10 #include "core/fxge/include/fx_ge.h" |
11 | 11 |
12 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) | 12 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 #ifdef PDF_ENABLE_XFA | 16 #ifdef PDF_ENABLE_XFA |
17 const uint32_t g_EncodingID[] = { | 17 const uint32_t g_EncodingID[] = { |
18 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, | 18 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, |
19 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, | 19 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, |
20 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, | 20 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { | 531 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { |
532 CFX_UnicodeEncodingEx* pFontEncoding = | 532 CFX_UnicodeEncodingEx* pFontEncoding = |
533 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); | 533 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); |
534 if (pFontEncoding) { | 534 if (pFontEncoding) { |
535 return pFontEncoding; | 535 return pFontEncoding; |
536 } | 536 } |
537 } | 537 } |
538 return NULL; | 538 return NULL; |
539 } | 539 } |
540 #endif // PDF_ENABLE_XFA | 540 #endif // PDF_ENABLE_XFA |
OLD | NEW |