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

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

Issue 1412243015: Remove CFontFileFaceInfo. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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 | « core/include/fxge/fx_font.h ('k') | core/src/fxge/ge/text_int.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 <limits> 7 #include <limits>
8 8
9 #include "../../../include/fxge/fx_ge.h" 9 #include "../../../include/fxge/fx_ge.h"
10 #include "../../../include/fxge/fx_freetype.h" 10 #include "../../../include/fxge/fx_freetype.h"
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 m_pFontInfo->DeleteFont(hFont); 1180 m_pFontInfo->DeleteFont(hFont);
1181 return face; 1181 return face;
1182 } 1182 }
1183 extern "C" { 1183 extern "C" {
1184 unsigned long _FTStreamRead(FXFT_Stream stream, 1184 unsigned long _FTStreamRead(FXFT_Stream stream,
1185 unsigned long offset, 1185 unsigned long offset,
1186 unsigned char* buffer, 1186 unsigned char* buffer,
1187 unsigned long count); 1187 unsigned long count);
1188 void _FTStreamClose(FXFT_Stream stream); 1188 void _FTStreamClose(FXFT_Stream stream);
1189 }; 1189 };
1190 CFontFileFaceInfo::CFontFileFaceInfo() {
1191 m_pFile = NULL;
1192 m_Face = NULL;
1193 m_Charsets = 0;
1194 m_FileSize = 0;
1195 m_FontOffset = 0;
1196 m_Weight = 0;
1197 m_bItalic = FALSE;
1198 m_PitchFamily = 0;
1199 }
1200 CFontFileFaceInfo::~CFontFileFaceInfo() {
1201 if (m_Face) {
1202 FXFT_Done_Face(m_Face);
1203 }
1204 m_Face = NULL;
1205 }
1206 #if _FX_OS_ == _FX_ANDROID_ 1190 #if _FX_OS_ == _FX_ANDROID_
1207 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) { 1191 IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) {
1208 return NULL; 1192 return NULL;
1209 } 1193 }
1210 #endif 1194 #endif
1211 CFX_FolderFontInfo::CFX_FolderFontInfo() {} 1195 CFX_FolderFontInfo::CFX_FolderFontInfo() {}
1212 CFX_FolderFontInfo::~CFX_FolderFontInfo() { 1196 CFX_FolderFontInfo::~CFX_FolderFontInfo() {
1213 for (const auto& pair : m_FontList) { 1197 for (const auto& pair : m_FontList) {
1214 delete pair.second; 1198 delete pair.second;
1215 } 1199 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 int PDF_GetStandardFontName(CFX_ByteString* name) { 1520 int PDF_GetStandardFontName(CFX_ByteString* name) {
1537 AltFontName* found = static_cast<AltFontName*>( 1521 AltFontName* found = static_cast<AltFontName*>(
1538 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), 1522 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames),
1539 sizeof(AltFontName), compareString)); 1523 sizeof(AltFontName), compareString));
1540 if (!found) 1524 if (!found)
1541 return -1; 1525 return -1;
1542 1526
1543 *name = g_Base14FontNames[found->m_Index]; 1527 *name = g_Base14FontNames[found->m_Index];
1544 return found->m_Index; 1528 return found->m_Index;
1545 } 1529 }
OLDNEW
« no previous file with comments | « core/include/fxge/fx_font.h ('k') | core/src/fxge/ge/text_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698