Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: xfa/fgas/font/cfgas_fontmgr.cpp

Issue 2524493002: Clean up CFGAS_GEFont (Closed)
Patch Set: Rebase? Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fde/fde_gedevice.cpp ('k') | xfa/fgas/font/cfgas_gefont.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « xfa/fde/fde_gedevice.cpp ('k') | xfa/fgas/font/cfgas_gefont.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698