OLD | NEW |
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_INCLUDE_FX_FONT_H_ | 7 #ifndef CORE_FXGE_INCLUDE_FX_FONT_H_ |
8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ | 8 #define CORE_FXGE_INCLUDE_FX_FONT_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 | 497 |
498 class CFX_AutoFontCache { | 498 class CFX_AutoFontCache { |
499 public: | 499 public: |
500 CFX_AutoFontCache(CFX_FontCache* pFontCache, CFX_Font* pFont) | 500 CFX_AutoFontCache(CFX_FontCache* pFontCache, CFX_Font* pFont) |
501 : m_pFontCache(pFontCache), m_pFont(pFont) {} | 501 : m_pFontCache(pFontCache), m_pFont(pFont) {} |
502 ~CFX_AutoFontCache() { m_pFontCache->ReleaseCachedFace(m_pFont); } | 502 ~CFX_AutoFontCache() { m_pFontCache->ReleaseCachedFace(m_pFont); } |
503 CFX_FontCache* m_pFontCache; | 503 CFX_FontCache* m_pFontCache; |
504 CFX_Font* m_pFont; | 504 CFX_Font* m_pFont; |
505 }; | 505 }; |
506 | 506 |
507 #define FX_FONTCACHE_DEFINE(pFontCache, pFont) \ | |
508 CFX_AutoFontCache autoFontCache((pFontCache), (pFont)) | |
509 class CFX_GlyphBitmap { | 507 class CFX_GlyphBitmap { |
510 public: | 508 public: |
511 int m_Top; | 509 int m_Top; |
512 int m_Left; | 510 int m_Left; |
513 CFX_DIBitmap m_Bitmap; | 511 CFX_DIBitmap m_Bitmap; |
514 }; | 512 }; |
515 | 513 |
516 class CFX_FaceCache { | 514 class CFX_FaceCache { |
517 public: | 515 public: |
518 explicit CFX_FaceCache(FXFT_Face face); | 516 explicit CFX_FaceCache(FXFT_Face face); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 FX_FLOAT retinaScaleX = 1.0f, | 574 FX_FLOAT retinaScaleX = 1.0f, |
577 FX_FLOAT retinaScaleY = 1.0f); | 575 FX_FLOAT retinaScaleY = 1.0f); |
578 | 576 |
579 CFX_ByteString GetNameFromTT(const uint8_t* name_table, | 577 CFX_ByteString GetNameFromTT(const uint8_t* name_table, |
580 uint32_t name_table_size, | 578 uint32_t name_table_size, |
581 uint32_t name); | 579 uint32_t name); |
582 | 580 |
583 int PDF_GetStandardFontName(CFX_ByteString* name); | 581 int PDF_GetStandardFontName(CFX_ByteString* name); |
584 | 582 |
585 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ | 583 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ |
OLD | NEW |