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

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

Issue 2260533002: Refactor fx_font part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months 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
OLDNEW
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 "xfa/fgas/font/fgas_gefont.h" 7 #include "xfa/fgas/font/fgas_gefont.h"
8 8
9 #include "core/fxge/include/cfx_unicodeencoding.h"
10 #include "core/fxge/include/cfx_unicodeencodingex.h"
9 #include "xfa/fgas/crt/fgas_codepage.h" 11 #include "xfa/fgas/crt/fgas_codepage.h"
10 #include "xfa/fgas/font/fgas_fontutils.h" 12 #include "xfa/fgas/font/fgas_fontutils.h"
11 #include "xfa/fxfa/include/xfa_fontmgr.h" 13 #include "xfa/fxfa/include/xfa_fontmgr.h"
12 14
13 // static 15 // static
14 CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily, 16 CFGAS_GEFont* CFGAS_GEFont::LoadFont(const FX_WCHAR* pszFontFamily,
15 uint32_t dwFontStyles, 17 uint32_t dwFontStyles,
16 uint16_t wCodePage, 18 uint16_t wCodePage,
17 IFGAS_FontMgr* pFontMgr) { 19 IFGAS_FontMgr* pFontMgr) {
18 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 20 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 } 450 }
449 if (m_pRectArray) { 451 if (m_pRectArray) {
450 m_pRectArray->RemoveAll(FALSE); 452 m_pRectArray->RemoveAll(FALSE);
451 } 453 }
452 } 454 }
453 CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const { 455 CFGAS_GEFont* CFGAS_GEFont::GetSubstFont(int32_t iGlyphIndex) const {
454 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; 456 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24;
455 return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this) 457 return iGlyphIndex == 0 ? const_cast<CFGAS_GEFont*>(this)
456 : m_SubstFonts[iGlyphIndex - 1]; 458 : m_SubstFonts[iGlyphIndex - 1];
457 } 459 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698