| 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 "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "../../../include/fxge/fx_freetype.h" |
| 9 #include "text_int.h" | 9 #include "text_int.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 extern void _FPDFAPI_GetInternalFontData(int id1, | 13 extern void _FPDFAPI_GetInternalFontData(int id1, |
| 13 const uint8_t*& data, | 14 const uint8_t*& data, |
| 14 FX_DWORD& size); | 15 FX_DWORD& size); |
| 15 | 16 |
| 16 namespace { | 17 namespace { |
| 17 | 18 |
| 18 const FX_DWORD g_EncodingID[] = { | 19 const FX_DWORD g_EncodingID[] = { |
| 19 FXFM_ENCODING_MS_SYMBOL, | 20 FXFM_ENCODING_MS_SYMBOL, |
| 20 FXFM_ENCODING_UNICODE, | 21 FXFM_ENCODING_UNICODE, |
| 21 FXFM_ENCODING_MS_SJIS, | 22 FXFM_ENCODING_MS_SJIS, |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 539 |
| 539 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { | 540 for (size_t i = 0; i < FX_ArraySize(g_EncodingID); ++i) { |
| 540 CFX_UnicodeEncodingEx* pFontEncoding = | 541 CFX_UnicodeEncodingEx* pFontEncoding = |
| 541 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); | 542 _FXFM_CreateFontEncoding(pFont, g_EncodingID[i]); |
| 542 if (pFontEncoding) { | 543 if (pFontEncoding) { |
| 543 return pFontEncoding; | 544 return pFontEncoding; |
| 544 } | 545 } |
| 545 } | 546 } |
| 546 return NULL; | 547 return NULL; |
| 547 } | 548 } |
| OLD | NEW |