| 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/fxge/ge/fx_text_int.h" | 7 #include "core/fxge/ge/fx_text_int.h" |
| 8 #include "core/include/fxge/fx_freetype.h" | 8 #include "core/include/fxge/fx_freetype.h" |
| 9 #include "core/include/fxge/fx_ge.h" | 9 #include "core/include/fxge/fx_ge.h" |
| 10 | 10 |
| 11 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) | 11 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) |
| 12 | 12 |
| 13 #ifdef PDF_ENABLE_XFA | |
| 14 extern void _FPDFAPI_GetInternalFontData(int id1, | |
| 15 const uint8_t*& data, | |
| 16 FX_DWORD& size); | |
| 17 #endif // PDF_ENABLE_XFA | |
| 18 | |
| 19 namespace { | 13 namespace { |
| 20 | 14 |
| 21 #ifdef PDF_ENABLE_XFA | 15 #ifdef PDF_ENABLE_XFA |
| 22 const FX_DWORD g_EncodingID[] = { | 16 const FX_DWORD g_EncodingID[] = { |
| 23 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, | 17 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, |
| 24 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, | 18 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, |
| 25 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, | 19 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, |
| 26 FXFM_ENCODING_MS_JOHAB, FXFM_ENCODING_ADOBE_STANDARD, | 20 FXFM_ENCODING_MS_JOHAB, FXFM_ENCODING_ADOBE_STANDARD, |
| 27 FXFM_ENCODING_ADOBE_EXPERT, FXFM_ENCODING_ADOBE_CUSTOM, | 21 FXFM_ENCODING_ADOBE_EXPERT, FXFM_ENCODING_ADOBE_CUSTOM, |
| 28 FXFM_ENCODING_ADOBE_LATIN_1, FXFM_ENCODING_OLD_LATIN_2, | 22 FXFM_ENCODING_ADOBE_LATIN_1, FXFM_ENCODING_OLD_LATIN_2, |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { | 530 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { |
| 537 CFX_UnicodeEncodingEx* pFontEncoding = | 531 CFX_UnicodeEncodingEx* pFontEncoding = |
| 538 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); | 532 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); |
| 539 if (pFontEncoding) { | 533 if (pFontEncoding) { |
| 540 return pFontEncoding; | 534 return pFontEncoding; |
| 541 } | 535 } |
| 542 } | 536 } |
| 543 return NULL; | 537 return NULL; |
| 544 } | 538 } |
| 545 #endif // PDF_ENABLE_XFA | 539 #endif // PDF_ENABLE_XFA |
| OLD | NEW |