| 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_fontmapper.h" | 7 #include "core/fxge/include/cfx_fontmapper.h" |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "core/fxge/include/cfx_substfont.h" |
| 13 #include "core/fxge/include/ifx_systemfontinfo.h" | 14 #include "core/fxge/include/ifx_systemfontinfo.h" |
| 14 #include "core/fxge/include/fx_font.h" | 15 #include "core/fxge/include/fx_font.h" |
| 15 | 16 |
| 16 #include "third_party/base/stl_util.h" | 17 #include "third_party/base/stl_util.h" |
| 17 | 18 |
| 18 #define FX_FONT_STYLE_None 0x00 | 19 #define FX_FONT_STYLE_None 0x00 |
| 19 #define FX_FONT_STYLE_Bold 0x01 | 20 #define FX_FONT_STYLE_Bold 0x01 |
| 20 #define FX_FONT_STYLE_Italic 0x02 | 21 #define FX_FONT_STYLE_Italic 0x02 |
| 21 #define FX_FONT_STYLE_BoldBold 0x04 | 22 #define FX_FONT_STYLE_BoldBold 0x04 |
| 22 | 23 |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 int PDF_GetStandardFontName(CFX_ByteString* name) { | 825 int PDF_GetStandardFontName(CFX_ByteString* name) { |
| 825 AltFontName* found = static_cast<AltFontName*>( | 826 AltFontName* found = static_cast<AltFontName*>( |
| 826 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), | 827 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), |
| 827 sizeof(AltFontName), CompareString)); | 828 sizeof(AltFontName), CompareString)); |
| 828 if (!found) | 829 if (!found) |
| 829 return -1; | 830 return -1; |
| 830 | 831 |
| 831 *name = g_Base14FontNames[found->m_Index]; | 832 *name = g_Base14FontNames[found->m_Index]; |
| 832 return found->m_Index; | 833 return found->m_Index; |
| 833 } | 834 } |
| OLD | NEW |