| 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_fontmgr.h" | 7 #include "core/fxge/include/cfx_fontmgr.h" |
| 8 | 8 |
| 9 #include "core/fxge/fontdata/chromefontdata/chromefontdata.h" | 9 #include "core/fxge/fontdata/chromefontdata/chromefontdata.h" |
| 10 #include "core/fxge/ge/cttfontdesc.h" |
| 10 #include "core/fxge/include/cfx_fontmapper.h" | 11 #include "core/fxge/include/cfx_fontmapper.h" |
| 12 #include "core/fxge/include/cfx_substfont.h" |
| 13 #include "core/fxge/include/fx_font.h" |
| 11 #include "core/fxge/include/ifx_systemfontinfo.h" | 14 #include "core/fxge/include/ifx_systemfontinfo.h" |
| 12 #include "core/fxge/include/fx_font.h" | |
| 13 | 15 |
| 14 namespace { | 16 namespace { |
| 15 | 17 |
| 16 struct BuiltinFont { | 18 struct BuiltinFont { |
| 17 const uint8_t* m_pFontData; | 19 const uint8_t* m_pFontData; |
| 18 uint32_t m_dwSize; | 20 uint32_t m_dwSize; |
| 19 }; | 21 }; |
| 20 | 22 |
| 21 const BuiltinFont g_FoxitFonts[14] = { | 23 const BuiltinFont g_FoxitFonts[14] = { |
| 22 {g_FoxitFixedFontData, 17597}, | 24 {g_FoxitFixedFontData, 17597}, |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 return true; | 250 return true; |
| 249 } | 251 } |
| 250 index -= FX_ArraySize(g_FoxitFonts); | 252 index -= FX_ArraySize(g_FoxitFonts); |
| 251 if (index < FX_ArraySize(g_MMFonts)) { | 253 if (index < FX_ArraySize(g_MMFonts)) { |
| 252 *pFontData = g_MMFonts[index].m_pFontData; | 254 *pFontData = g_MMFonts[index].m_pFontData; |
| 253 *size = g_MMFonts[index].m_dwSize; | 255 *size = g_MMFonts[index].m_dwSize; |
| 254 return true; | 256 return true; |
| 255 } | 257 } |
| 256 return false; | 258 return false; |
| 257 } | 259 } |
| OLD | NEW |