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

Side by Side Diff: core/fxge/apple/apple_int.h

Issue 2112213002: Clean up CFX_MacFontInfo and surrounding code. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit Created 4 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 | « no previous file | core/fxge/apple/fx_mac_imp.cpp » ('j') | core/fxge/apple/fx_mac_imp.cpp » ('J')
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 #ifndef CORE_FXGE_APPLE_APPLE_INT_H_ 7 #ifndef CORE_FXGE_APPLE_APPLE_INT_H_
8 #define CORE_FXGE_APPLE_APPLE_INT_H_ 8 #define CORE_FXGE_APPLE_APPLE_INT_H_
9 9
10 #include "core/fxcrt/include/fx_system.h" 10 #include "core/fxcrt/include/fx_system.h"
11 11
12 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 12 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
13 13
14 #include "core/fxge/include/fx_dib.h" 14 #include "core/fxge/include/fx_dib.h"
15 #include "core/fxge/include/ifx_renderdevicedriver.h" 15 #include "core/fxge/include/ifx_renderdevicedriver.h"
16 16
17 #if _FX_OS_ == _FX_MACOSX_ 17 #if _FX_OS_ == _FX_MACOSX_
18 #include <Carbon/Carbon.h> 18 #include <Carbon/Carbon.h>
19 #endif 19 #endif
20 20
21 typedef enum eFXIOSFONTCHARSET {
22 eFXFontCharsetDEFAULT = 0,
23 eFXFontCharsetANSI = 1,
24 eFXFontCharsetSYMBOL = 1 << 1,
25 eFXFontCharsetSHIFTJIS = 1 << 2,
26 eFXFontCharsetHANGEUL = 1 << 3,
27 eFXFontCharsetGB2312 = 1 << 4,
28 eFXFontCharsetCHINESEBIG5 = 1 << 5,
29 eFXFontCharsetTHAI = 1 << 6,
30 eFXFontCharsetEASTEUROPE = 1 << 7,
31 eFXFontCharsetRUSSIAN = 1 << 8,
32 eFXFontCharsetGREEK = 1 << 9,
33 eFXFontCharsetTURKISH = 1 << 10,
34 eFXFontCharsetHEBREW = 1 << 11,
35 eFXFontCharsetARABIC = 1 << 12,
36 eFXFontCharsetBALTIC = 1 << 13,
37 } FX_IOSCHARSET;
38
39 FX_IOSCHARSET FX_GetiOSCharset(int charset);
40 typedef enum eFXIOSFONTFLAG {
41 eFXFontFlagBold = 1,
42 eFXFontFlagItalic = 1 << 1,
43 eFXFontFlagFixedPitch = 1 << 2,
44 eFXFontFlagSerif = 1 << 3,
45 eFXFontFlagScript = 1 << 4,
46 } FX_IOSFONTFLAG;
47
48 typedef struct IOS_FONTDATA_ {
49 uint32_t nHashCode;
50 const char* psName;
51 uint32_t charsets;
52 uint32_t styles;
53 } IOS_FONTDATA;
54
55 class CQuartz2D { 21 class CQuartz2D {
56 public: 22 public:
57 void* createGraphics(CFX_DIBitmap* bitmap); 23 void* createGraphics(CFX_DIBitmap* bitmap);
58 void destroyGraphics(void* graphics); 24 void destroyGraphics(void* graphics);
59 25
60 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize); 26 void* CreateFont(const uint8_t* pFontData, uint32_t dwFontSize);
61 void DestroyFont(void* pFont); 27 void DestroyFont(void* pFont);
62 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix); 28 void setGraphicsTextMatrix(void* graphics, CFX_Matrix* matrix);
63 FX_BOOL drawGraphicsString(void* graphics, 29 FX_BOOL drawGraphicsString(void* graphics,
64 void* font, 30 void* font,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int32_t m_saveCount; 139 int32_t m_saveCount;
174 140
175 int32_t m_width; 141 int32_t m_width;
176 int32_t m_height; 142 int32_t m_height;
177 int32_t m_bitsPerPixel; 143 int32_t m_bitsPerPixel;
178 int32_t m_deviceClass; 144 int32_t m_deviceClass;
179 int32_t m_renderCaps; 145 int32_t m_renderCaps;
180 int32_t m_horzSize; 146 int32_t m_horzSize;
181 int32_t m_vertSize; 147 int32_t m_vertSize;
182 }; 148 };
183 149 #endif // _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
184 uint32_t FX_GetHashCode(const FX_CHAR* pStr);
185 uint32_t FX_IOSGetMatchFamilyNameHashcode(const FX_CHAR* pFontName);
186 uint32_t FX_IOSGetFamilyNamesCount();
187 const FX_CHAR* FX_IOSGetFamilyName(uint32_t uIndex);
188 #endif
189 150
190 #endif // CORE_FXGE_APPLE_APPLE_INT_H_ 151 #endif // CORE_FXGE_APPLE_APPLE_INT_H_
OLDNEW
« no previous file with comments | « no previous file | core/fxge/apple/fx_mac_imp.cpp » ('j') | core/fxge/apple/fx_mac_imp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698