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

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

Issue 1301073003: Merge to XFA: Extern in .cpp files is a code smell, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 4 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/fontdata/chromefontdata/chromefontdata.h ('k') | fpdfsdk/include/fsdk_define.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"
11 #include "../fontdata/chromefontdata/chromefontdata.h"
11 #include "text_int.h" 12 #include "text_int.h"
12 13
13 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1]) 14 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1])
14 #define GET_TT_LONG(w) \ 15 #define GET_TT_LONG(w) \
15 (FX_DWORD)(((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3]) 16 (FX_DWORD)(((w)[0] << 24) | ((w)[1] << 16) | ((w)[2] << 8) | (w)[3])
16 17
17 namespace { 18 namespace {
18 19
19 CFX_ByteString KeyNameFromFace(const CFX_ByteString& face_name, 20 CFX_ByteString KeyNameFromFace(const CFX_ByteString& face_name,
20 int weight, 21 int weight,
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 m_FaceMap.erase(temp); 400 m_FaceMap.erase(temp);
400 bNeedFaceDone = FALSE; 401 bNeedFaceDone = FALSE;
401 } else if (nRet > 0) { 402 } else if (nRet > 0) {
402 bNeedFaceDone = FALSE; 403 bNeedFaceDone = FALSE;
403 } 404 }
404 } 405 }
405 if (bNeedFaceDone && !m_pBuiltinMapper->IsBuiltinFace(face)) { 406 if (bNeedFaceDone && !m_pBuiltinMapper->IsBuiltinFace(face)) {
406 FXFT_Done_Face(face); 407 FXFT_Done_Face(face);
407 } 408 }
408 } 409 }
409 extern "C" {
410 extern const unsigned char g_FoxitFixedItalicFontData[18746];
411 extern const unsigned char g_FoxitFixedFontData[17597];
412 extern const unsigned char g_FoxitSansItalicFontData[16339];
413 extern const unsigned char g_FoxitSansFontData[15025];
414 extern const unsigned char g_FoxitSerifItalicFontData[21227];
415 extern const unsigned char g_FoxitSerifFontData[19469];
416 extern const unsigned char g_FoxitFixedBoldItalicFontData[19151];
417 extern const unsigned char g_FoxitFixedBoldFontData[18055];
418 extern const unsigned char g_FoxitSansBoldItalicFontData[16418];
419 extern const unsigned char g_FoxitSansBoldFontData[16344];
420 extern const unsigned char g_FoxitSerifBoldItalicFontData[20733];
421 extern const unsigned char g_FoxitSerifBoldFontData[19395];
422 extern const unsigned char g_FoxitSymbolFontData[16729];
423 extern const unsigned char g_FoxitDingbatsFontData[29513];
424 extern const unsigned char g_FoxitSerifMMFontData[113417];
425 extern const unsigned char g_FoxitSansMMFontData[66919];
426 };
427 const FoxitFonts g_FoxitFonts[14] = { 410 const FoxitFonts g_FoxitFonts[14] = {
428 {g_FoxitFixedFontData, 17597}, 411 {g_FoxitFixedFontData, 17597},
429 {g_FoxitFixedBoldFontData, 18055}, 412 {g_FoxitFixedBoldFontData, 18055},
430 {g_FoxitFixedBoldItalicFontData, 19151}, 413 {g_FoxitFixedBoldItalicFontData, 19151},
431 {g_FoxitFixedItalicFontData, 18746}, 414 {g_FoxitFixedItalicFontData, 18746},
432 {g_FoxitSansFontData, 15025}, 415 {g_FoxitSansFontData, 15025},
433 {g_FoxitSansBoldFontData, 16344}, 416 {g_FoxitSansBoldFontData, 16344},
434 {g_FoxitSansBoldItalicFontData, 16418}, 417 {g_FoxitSansBoldItalicFontData, 16418},
435 {g_FoxitSansItalicFontData, 16339}, 418 {g_FoxitSansItalicFontData, 16339},
436 {g_FoxitSerifFontData, 19469}, 419 {g_FoxitSerifFontData, 19469},
(...skipping 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1598 if (hFont == NULL) { 1581 if (hFont == NULL) {
1599 return FALSE; 1582 return FALSE;
1600 } 1583 }
1601 CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont; 1584 CFX_FontFaceInfo* pFont = (CFX_FontFaceInfo*)hFont;
1602 name = pFont->m_FaceName; 1585 name = pFont->m_FaceName;
1603 return TRUE; 1586 return TRUE;
1604 } 1587 }
1605 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) { 1588 FX_BOOL CFX_FolderFontInfo::GetFontCharset(void* hFont, int& charset) {
1606 return FALSE; 1589 return FALSE;
1607 } 1590 }
OLDNEW
« no previous file with comments | « core/src/fxge/fontdata/chromefontdata/chromefontdata.h ('k') | fpdfsdk/include/fsdk_define.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698