| 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/include/fx_font.h" | 7 #include "core/fxge/include/fx_font.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" | 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" |
| 10 #include "core/fxge/include/cfx_fontmgr.h" | 10 #include "core/fxge/include/cfx_fontmgr.h" |
| 11 #include "core/fxge/ge/fx_text_int.h" | 11 #include "core/fxge/ge/fx_text_int.h" |
| 12 #include "core/fxge/include/cfx_gemodule.h" |
| 12 #include "core/fxge/include/fx_freetype.h" | 13 #include "core/fxge/include/fx_freetype.h" |
| 13 #include "core/fxge/include/fx_ge.h" | |
| 14 | 14 |
| 15 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) | 15 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 #ifdef PDF_ENABLE_XFA | 19 #ifdef PDF_ENABLE_XFA |
| 20 const uint32_t g_EncodingID[] = { | 20 const uint32_t g_EncodingID[] = { |
| 21 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, | 21 FXFM_ENCODING_MS_SYMBOL, FXFM_ENCODING_UNICODE, |
| 22 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, | 22 FXFM_ENCODING_MS_SJIS, FXFM_ENCODING_MS_GB2312, |
| 23 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, | 23 FXFM_ENCODING_MS_BIG5, FXFM_ENCODING_MS_WANSUNG, |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 524 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { | 524 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { |
| 525 CFX_UnicodeEncodingEx* pFontEncoding = | 525 CFX_UnicodeEncodingEx* pFontEncoding = |
| 526 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); | 526 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); |
| 527 if (pFontEncoding) { | 527 if (pFontEncoding) { |
| 528 return pFontEncoding; | 528 return pFontEncoding; |
| 529 } | 529 } |
| 530 } | 530 } |
| 531 return nullptr; | 531 return nullptr; |
| 532 } | 532 } |
| 533 #endif // PDF_ENABLE_XFA | 533 #endif // PDF_ENABLE_XFA |
| OLD | NEW |