OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef CORE_FXGE_INCLUDE_CFX_FACECACHE_H_ | |
8 #define CORE_FXGE_INCLUDE_CFX_FACECACHE_H_ | |
9 | |
10 #include <map> | |
11 | |
12 #include "core/fxge/include/fx_dib.h" | |
13 #include "core/fxge/include/fx_font.h" | |
14 #include "core/fxge/include/fx_freetype.h" | |
15 | |
16 class CFX_FaceCache { | |
17 public: | |
18 explicit CFX_FaceCache(FXFT_Face face); | |
19 ~CFX_FaceCache(); | |
20 const CFX_GlyphBitmap* LoadGlyphBitmap(CFX_Font* pFont, | |
21 uint32_t glyph_index, | |
22 FX_BOOL bFontStyle, | |
23 const CFX_Matrix* pMatrix, | |
24 int dest_width, | |
25 int anti_alias, | |
26 int& text_flags); | |
27 const CFX_PathData* LoadGlyphPath(CFX_Font* pFont, | |
28 uint32_t glyph_index, | |
29 int dest_width); | |
30 | |
31 #ifdef _SKIA_SUPPORT_ | |
32 CFX_TypeFace* GetDeviceCache(CFX_Font* pFont); | |
33 #endif | |
34 | |
35 private: | |
36 CFX_GlyphBitmap* RenderGlyph(CFX_Font* pFont, | |
37 uint32_t glyph_index, | |
38 FX_BOOL bFontStyle, | |
39 const CFX_Matrix* pMatrix, | |
40 int dest_width, | |
41 int anti_alias); | |
42 CFX_GlyphBitmap* RenderGlyph_Nativetext(CFX_Font* pFont, | |
43 uint32_t glyph_index, | |
44 const CFX_Matrix* pMatrix, | |
45 int dest_width, | |
46 int anti_alias); | |
47 CFX_GlyphBitmap* LookUpGlyphBitmap(CFX_Font* pFont, | |
48 const CFX_Matrix* pMatrix, | |
49 const CFX_ByteString& FaceGlyphsKey, | |
50 uint32_t glyph_index, | |
51 FX_BOOL bFontStyle, | |
52 int dest_width, | |
53 int anti_alias); | |
54 void InitPlatform(); | |
55 void DestroyPlatform(); | |
56 | |
57 FXFT_Face const m_Face; | |
58 std::map<CFX_ByteString, CFX_SizeGlyphCache*> m_SizeMap; | |
59 std::map<uint32_t, CFX_PathData*> m_PathMap; | |
60 CFX_DIBitmap* m_pBitmap; | |
Lei Zhang
2016/08/19 18:24:46
Is this used?
npm
2016/08/19 22:02:33
Apparently not
| |
61 #ifdef _SKIA_SUPPORT_ | |
62 CFX_TypeFace* m_pTypeface; | |
63 #endif | |
64 }; | |
65 | |
66 #endif // CORE_FXGE_INCLUDE_CFX_FACECACHE_H_ | |
OLD | NEW |