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

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

Issue 1862123003: Rename both As{Byte,Wide}StringC() helpers to AsStringC(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, fix new usage. Created 4 years, 8 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
« no previous file with comments | « xfa/fee/fde_txtedtengine.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('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 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 "xfa/fgas/crt/fgas_codepage.h" 9 #include "xfa/fgas/crt/fgas_codepage.h"
10 #include "xfa/fgas/font/fgas_fontutils.h" 10 #include "xfa/fgas/font/fgas_fontutils.h"
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 return (uint8_t)m_wCharSet; 340 return (uint8_t)m_wCharSet;
341 } 341 }
342 if (!m_pFont->GetSubstFont()) { 342 if (!m_pFont->GetSubstFont()) {
343 return FX_CHARSET_Default; 343 return FX_CHARSET_Default;
344 } 344 }
345 return m_pFont->GetSubstFont()->m_Charset; 345 return m_pFont->GetSubstFont()->m_Charset;
346 } 346 }
347 void CFX_GEFont::GetFamilyName(CFX_WideString& wsFamily) const { 347 void CFX_GEFont::GetFamilyName(CFX_WideString& wsFamily) const {
348 if (!m_pFont->GetSubstFont() || 348 if (!m_pFont->GetSubstFont() ||
349 m_pFont->GetSubstFont()->m_Family.GetLength() == 0) { 349 m_pFont->GetSubstFont()->m_Family.GetLength() == 0) {
350 wsFamily = 350 wsFamily = CFX_WideString::FromLocal(m_pFont->GetFamilyName().AsStringC());
351 CFX_WideString::FromLocal(m_pFont->GetFamilyName().AsByteStringC());
352 } else { 351 } else {
353 wsFamily = CFX_WideString::FromLocal( 352 wsFamily = CFX_WideString::FromLocal(
354 m_pFont->GetSubstFont()->m_Family.AsByteStringC()); 353 m_pFont->GetSubstFont()->m_Family.AsStringC());
355 } 354 }
356 } 355 }
357 void CFX_GEFont::GetPsName(CFX_WideString& wsName) const { 356 void CFX_GEFont::GetPsName(CFX_WideString& wsName) const {
358 wsName = m_pFont->GetPsName(); 357 wsName = m_pFont->GetPsName();
359 } 358 }
360 uint32_t CFX_GEFont::GetFontStyles() const { 359 uint32_t CFX_GEFont::GetFontStyles() const {
361 FXSYS_assert(m_pFont != NULL); 360 FXSYS_assert(m_pFont != NULL);
362 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ 361 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
363 if (m_bUseLogFontStyle) { 362 if (m_bUseLogFontStyle) {
364 return m_dwLogFontStyle; 363 return m_dwLogFontStyle;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 } 564 }
566 if (m_pRectArray != NULL) { 565 if (m_pRectArray != NULL) {
567 m_pRectArray->RemoveAll(); 566 m_pRectArray->RemoveAll();
568 } 567 }
569 } 568 }
570 IFX_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const { 569 IFX_Font* CFX_GEFont::GetSubstFont(int32_t iGlyphIndex) const {
571 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24; 570 iGlyphIndex = ((uint32_t)iGlyphIndex) >> 24;
572 return iGlyphIndex == 0 ? (IFX_Font*)this 571 return iGlyphIndex == 0 ? (IFX_Font*)this
573 : (IFX_Font*)m_SubstFonts[iGlyphIndex - 1]; 572 : (IFX_Font*)m_SubstFonts[iGlyphIndex - 1];
574 } 573 }
OLDNEW
« no previous file with comments | « xfa/fee/fde_txtedtengine.cpp ('k') | xfa/fgas/font/fgas_stdfontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698