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

Side by Side Diff: core/fxge/include/fx_font.h

Issue 1982263004: Don't use LCD antialiasing if Fontconfig doesn't support hinting (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Initialize m_FTLibrarySupportsHinting Created 4 years, 7 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/fxge/ge/fx_ge_text.cpp ('k') | no next file » | 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 #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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 FXFT_Face FindSubstFont(const CFX_ByteString& face_name, 273 FXFT_Face FindSubstFont(const CFX_ByteString& face_name,
274 FX_BOOL bTrueType, 274 FX_BOOL bTrueType,
275 uint32_t flags, 275 uint32_t flags,
276 int weight, 276 int weight,
277 int italic_angle, 277 int italic_angle,
278 int CharsetCP, 278 int CharsetCP,
279 CFX_SubstFont* pSubstFont); 279 CFX_SubstFont* pSubstFont);
280 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size); 280 bool GetBuiltinFont(size_t index, const uint8_t** pFontData, uint32_t* size);
281 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); } 281 CFX_FontMapper* GetBuiltinMapper() const { return m_pBuiltinMapper.get(); }
282 FXFT_Library GetFTLibrary() const { return m_FTLibrary; } 282 FXFT_Library GetFTLibrary() const { return m_FTLibrary; }
283 bool FTLibrarySupportsHinting() const { return m_FTLibrarySupportsHinting; }
283 284
284 private: 285 private:
285 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper; 286 std::unique_ptr<CFX_FontMapper> m_pBuiltinMapper;
286 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap; 287 std::map<CFX_ByteString, CTTFontDesc*> m_FaceMap;
287 FXFT_Library m_FTLibrary; 288 FXFT_Library m_FTLibrary;
289 bool m_FTLibrarySupportsHinting;
288 }; 290 };
289 291
290 class CFX_FontMapper { 292 class CFX_FontMapper {
291 public: 293 public:
292 explicit CFX_FontMapper(CFX_FontMgr* mgr); 294 explicit CFX_FontMapper(CFX_FontMgr* mgr);
293 ~CFX_FontMapper(); 295 ~CFX_FontMapper();
294 296
295 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo); 297 void SetSystemFontInfo(IFX_SystemFontInfo* pFontInfo);
296 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; } 298 IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo; }
297 void AddInstalledFont(const CFX_ByteString& name, int charset); 299 void AddInstalledFont(const CFX_ByteString& name, int charset);
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 FX_FLOAT retinaScaleX = 1.0f, 534 FX_FLOAT retinaScaleX = 1.0f,
533 FX_FLOAT retinaScaleY = 1.0f); 535 FX_FLOAT retinaScaleY = 1.0f);
534 536
535 CFX_ByteString GetNameFromTT(const uint8_t* name_table, 537 CFX_ByteString GetNameFromTT(const uint8_t* name_table,
536 uint32_t name_table_size, 538 uint32_t name_table_size,
537 uint32_t name); 539 uint32_t name);
538 540
539 int PDF_GetStandardFontName(CFX_ByteString* name); 541 int PDF_GetStandardFontName(CFX_ByteString* name);
540 542
541 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_ 543 #endif // CORE_FXGE_INCLUDE_FX_FONT_H_
OLDNEW
« no previous file with comments | « core/fxge/ge/fx_ge_text.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698