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

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

Issue 404653005: Remove a few unused variables, functions, and tables. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 5 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 | « core/src/fxge/ge/fx_ge_font.cpp ('k') | core/src/fxge/ge/fx_ge_path.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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "../../../include/fxge/fx_freetype.h" 8 #include "../../../include/fxge/fx_freetype.h"
9 #include "text_int.h" 9 #include "text_int.h"
10 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1]) 10 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1])
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 family = SubstName; 968 family = SubstName;
969 } 969 }
970 for (; iBaseFont < 12; iBaseFont ++) 970 for (; iBaseFont < 12; iBaseFont ++)
971 if (family == CFX_ByteStringC(g_Base14FontNames[iBaseFont])) { 971 if (family == CFX_ByteStringC(g_Base14FontNames[iBaseFont])) {
972 break; 972 break;
973 } 973 }
974 int PitchFamily = 0; 974 int PitchFamily = 0;
975 FX_BOOL bItalic = FALSE; 975 FX_BOOL bItalic = FALSE;
976 FX_DWORD nStyle = 0; 976 FX_DWORD nStyle = 0;
977 FX_BOOL bStyleAvail = FALSE; 977 FX_BOOL bStyleAvail = FALSE;
978 FX_BOOL bFamilyStyleIsWhole = FALSE;
979 FX_BOOL bNextF = FALSE;
980 if (iBaseFont < 12) { 978 if (iBaseFont < 12) {
981 family = g_Base14FontNames[iBaseFont]; 979 family = g_Base14FontNames[iBaseFont];
982 if ((iBaseFont % 4) == 1 || (iBaseFont % 4) == 2) { 980 if ((iBaseFont % 4) == 1 || (iBaseFont % 4) == 2) {
983 nStyle |= FX_FONT_STYLE_Bold; 981 nStyle |= FX_FONT_STYLE_Bold;
984 } 982 }
985 if ((iBaseFont % 4) / 2) { 983 if ((iBaseFont % 4) / 2) {
986 nStyle |= FX_FONT_STYLE_Italic; 984 nStyle |= FX_FONT_STYLE_Italic;
987 } 985 }
988 if (iBaseFont < 4) { 986 if (iBaseFont < 4) {
989 PitchFamily |= FXFONT_FF_FIXEDPITCH; 987 PitchFamily |= FXFONT_FF_FIXEDPITCH;
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 for (FX_DWORD i = 0; i < nTables; i ++) { 1526 for (FX_DWORD i = 0; i < nTables; i ++) {
1529 FX_LPCBYTE p = (FX_LPCBYTE)pFont->m_FontTables + i * 16; 1527 FX_LPCBYTE p = (FX_LPCBYTE)pFont->m_FontTables + i * 16;
1530 if (GET_TT_LONG(p) == table) { 1528 if (GET_TT_LONG(p) == table) {
1531 offset = GET_TT_LONG(p + 8); 1529 offset = GET_TT_LONG(p + 8);
1532 datasize = GET_TT_LONG(p + 12); 1530 datasize = GET_TT_LONG(p + 12);
1533 } 1531 }
1534 } 1532 }
1535 } 1533 }
1536 if (datasize && size >= datasize && pFile) { 1534 if (datasize && size >= datasize && pFile) {
1537 FXSYS_fseek(pFile, offset, FXSYS_SEEK_SET); 1535 FXSYS_fseek(pFile, offset, FXSYS_SEEK_SET);
1538 size_t readCnt = FXSYS_fread(buffer, datasize, 1, pFile); 1536 FXSYS_fread(buffer, datasize, 1, pFile);
1539 } 1537 }
1540 if (pFile) { 1538 if (pFile) {
1541 FXSYS_fclose(pFile); 1539 FXSYS_fclose(pFile);
1542 } 1540 }
1543 return datasize; 1541 return datasize;
1544 } 1542 }
1545 void CFX_FolderFontInfo::DeleteFont(void* hFont) 1543 void CFX_FolderFontInfo::DeleteFont(void* hFont)
1546 { 1544 {
1547 } 1545 }
1548 FX_BOOL CFX_FolderFontInfo::GetFaceName(void* hFont, CFX_ByteString& name) 1546 FX_BOOL CFX_FolderFontInfo::GetFaceName(void* hFont, CFX_ByteString& name)
1549 { 1547 {
1550 if (hFont == NULL) { 1548 if (hFont == NULL) {
1551 return FALSE; 1549 return FALSE;
1552 } 1550 }
1553 CFontFaceInfo* pFont = (CFontFaceInfo*)hFont; 1551 CFontFaceInfo* pFont = (CFontFaceInfo*)hFont;
1554 name = pFont->m_FaceName; 1552 name = pFont->m_FaceName;
1555 return TRUE; 1553 return TRUE;
1556 } 1554 }
1557 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) 1555 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset)
1558 { 1556 {
1559 return FALSE; 1557 return FALSE;
1560 } 1558 }
1561 #endif 1559 #endif
OLDNEW
« no previous file with comments | « core/src/fxge/ge/fx_ge_font.cpp ('k') | core/src/fxge/ge/fx_ge_path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698