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

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

Issue 1864893003: Remove IFX_FontEnumerator (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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 | « no previous file | core/fxge/include/fx_font.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 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 *pFontData = g_MMFonts[index].m_pFontData; 644 *pFontData = g_MMFonts[index].m_pFontData;
645 *size = g_MMFonts[index].m_dwSize; 645 *size = g_MMFonts[index].m_dwSize;
646 return true; 646 return true;
647 } 647 }
648 return false; 648 return false;
649 } 649 }
650 650
651 CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr) 651 CFX_FontMapper::CFX_FontMapper(CFX_FontMgr* mgr)
652 : m_bListLoaded(FALSE), 652 : m_bListLoaded(FALSE),
653 m_pFontInfo(nullptr), 653 m_pFontInfo(nullptr),
654 m_pFontEnumerator(nullptr),
655 m_pFontMgr(mgr) { 654 m_pFontMgr(mgr) {
656 m_MMFaces[0] = nullptr; 655 m_MMFaces[0] = nullptr;
657 m_MMFaces[1] = nullptr; 656 m_MMFaces[1] = nullptr;
658 FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces)); 657 FXSYS_memset(m_FoxitFaces, 0, sizeof(m_FoxitFaces));
659 } 658 }
660 CFX_FontMapper::~CFX_FontMapper() { 659 CFX_FontMapper::~CFX_FontMapper() {
661 for (size_t i = 0; i < FX_ArraySize(m_FoxitFaces); ++i) { 660 for (size_t i = 0; i < FX_ArraySize(m_FoxitFaces); ++i) {
662 if (m_FoxitFaces[i]) 661 if (m_FoxitFaces[i])
663 FXFT_Done_Face(m_FoxitFaces[i]); 662 FXFT_Done_Face(m_FoxitFaces[i]);
664 } 663 }
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1644 int PDF_GetStandardFontName(CFX_ByteString* name) { 1643 int PDF_GetStandardFontName(CFX_ByteString* name) {
1645 AltFontName* found = static_cast<AltFontName*>( 1644 AltFontName* found = static_cast<AltFontName*>(
1646 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), 1645 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames),
1647 sizeof(AltFontName), CompareString)); 1646 sizeof(AltFontName), CompareString));
1648 if (!found) 1647 if (!found)
1649 return -1; 1648 return -1;
1650 1649
1651 *name = g_Base14FontNames[found->m_Index]; 1650 *name = g_Base14FontNames[found->m_Index];
1652 return found->m_Index; 1651 return found->m_Index;
1653 } 1652 }
OLDNEW
« no previous file with comments | « no previous file | core/fxge/include/fx_font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698