OLD | NEW |
1 // Copyright 2015 PDFium Authors. All rights reserved. | 1 // Copyright 2015 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 "xfa/fgas/font/cfgas_fontmgr.h" | 7 #include "xfa/fgas/font/cfgas_fontmgr.h" |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "core/fxcrt/fx_stream.h" | 12 #include "core/fxcrt/fx_stream.h" |
13 #include "core/fxge/cfx_fontmapper.h" | 13 #include "core/fxge/cfx_fontmapper.h" |
14 #include "core/fxge/cfx_fontmgr.h" | 14 #include "core/fxge/cfx_fontmgr.h" |
15 #include "core/fxge/cfx_gemodule.h" | 15 #include "core/fxge/cfx_gemodule.h" |
16 #include "core/fxge/ifx_systemfontinfo.h" | 16 #include "core/fxge/ifx_systemfontinfo.h" |
17 #include "third_party/base/ptr_util.h" | 17 #include "third_party/base/ptr_util.h" |
18 #include "xfa/fgas/crt/fgas_codepage.h" | 18 #include "xfa/fgas/crt/fgas_codepage.h" |
| 19 #include "xfa/fgas/font/cfgas_gefont.h" |
19 #include "xfa/fgas/font/fgas_fontutils.h" | 20 #include "xfa/fgas/font/fgas_fontutils.h" |
20 #include "xfa/fgas/font/fgas_gefont.h" | |
21 | 21 |
22 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 22 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 int32_t GetSimilarityScore(FX_FONTDESCRIPTOR const* pFont, | 26 int32_t GetSimilarityScore(FX_FONTDESCRIPTOR const* pFont, |
27 uint32_t dwFontStyles) { | 27 uint32_t dwFontStyles) { |
28 int32_t iValue = 0; | 28 int32_t iValue = 0; |
29 if ((dwFontStyles & FX_FONTSTYLE_Symbolic) == | 29 if ((dwFontStyles & FX_FONTSTYLE_Symbolic) == |
30 (pFont->dwFontStyles & FX_FONTSTYLE_Symbolic)) { | 30 (pFont->dwFontStyles & FX_FONTSTYLE_Symbolic)) { |
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1207 } | 1207 } |
1208 | 1208 |
1209 int32_t CFGAS_FontMgr::IsPartName(const CFX_WideString& Name1, | 1209 int32_t CFGAS_FontMgr::IsPartName(const CFX_WideString& Name1, |
1210 const CFX_WideString& Name2) { | 1210 const CFX_WideString& Name2) { |
1211 if (Name1.Find(Name2.c_str()) != -1) | 1211 if (Name1.Find(Name2.c_str()) != -1) |
1212 return 1; | 1212 return 1; |
1213 return 0; | 1213 return 0; |
1214 } | 1214 } |
1215 | 1215 |
1216 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 1216 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
OLD | NEW |