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

Side by Side Diff: core/fxge/ge/cfx_fontmapper.cpp

Issue 2409173003: Delete unused flags from CFX_SubstFont (Closed)
Patch Set: Created 4 years, 2 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 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/cfx_fontmapper.h" 7 #include "core/fxge/cfx_fontmapper.h"
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 if (Charset == FXFONT_SYMBOL_CHARSET) { 638 if (Charset == FXFONT_SYMBOL_CHARSET) {
639 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \ 639 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
640 _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_ 640 _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
641 if (SubstName == "Symbol") { 641 if (SubstName == "Symbol") {
642 pSubstFont->m_Family = "Chrome Symbol"; 642 pSubstFont->m_Family = "Chrome Symbol";
643 pSubstFont->m_Charset = FXFONT_SYMBOL_CHARSET; 643 pSubstFont->m_Charset = FXFONT_SYMBOL_CHARSET;
644 return UseInternalSubst(pSubstFont, 12, italic_angle, old_weight, 644 return UseInternalSubst(pSubstFont, 12, italic_angle, old_weight,
645 PitchFamily); 645 PitchFamily);
646 } 646 }
647 #endif 647 #endif
648 pSubstFont->m_SubstFlags |= FXFONT_SUBST_NONSYMBOL;
649 return FindSubstFont(family, bTrueType, flags & ~FXFONT_SYMBOLIC, 648 return FindSubstFont(family, bTrueType, flags & ~FXFONT_SYMBOLIC,
650 weight, italic_angle, 0, pSubstFont); 649 weight, italic_angle, 0, pSubstFont);
651 } 650 }
652 if (Charset == FXFONT_ANSI_CHARSET) { 651 if (Charset == FXFONT_ANSI_CHARSET) {
653 return UseInternalSubst(pSubstFont, iBaseFont, italic_angle, old_weight, 652 return UseInternalSubst(pSubstFont, iBaseFont, italic_angle, old_weight,
654 PitchFamily); 653 PitchFamily);
655 } 654 }
656 655
657 auto it = 656 auto it =
658 std::find_if(m_FaceArray.begin(), m_FaceArray.end(), 657 std::find_if(m_FaceArray.begin(), m_FaceArray.end(),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 int PDF_GetStandardFontName(CFX_ByteString* name) { 801 int PDF_GetStandardFontName(CFX_ByteString* name) {
803 AltFontName* found = static_cast<AltFontName*>( 802 AltFontName* found = static_cast<AltFontName*>(
804 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), 803 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames),
805 sizeof(AltFontName), CompareString)); 804 sizeof(AltFontName), CompareString));
806 if (!found) 805 if (!found)
807 return -1; 806 return -1;
808 807
809 *name = g_Base14FontNames[found->m_Index]; 808 *name = g_Base14FontNames[found->m_Index];
810 return found->m_Index; 809 return found->m_Index;
811 } 810 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698