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

Unified Diff: core/fpdfapi/fpdf_font/include/cpdf_font.h

Issue 2276653002: Add fallback fonts in pdfium (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Only fallbacks in vector Created 4 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 side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_font/include/cpdf_font.h
diff --git a/core/fpdfapi/fpdf_font/include/cpdf_font.h b/core/fpdfapi/fpdf_font/include/cpdf_font.h
index a76a6a25734eb7005b65734f3deda31fb1dae285..3293b3b94756e6e9a7d4ea10a32aea93ab172158 100644
--- a/core/fpdfapi/fpdf_font/include/cpdf_font.h
+++ b/core/fpdfapi/fpdf_font/include/cpdf_font.h
@@ -71,6 +71,10 @@ class CPDF_Font {
virtual int GlyphFromCharCodeExt(uint32_t charcode);
virtual CFX_WideString UnicodeFromCharCode(uint32_t charcode) const;
virtual uint32_t CharCodeFromUnicode(FX_WCHAR Unicode) const;
+ uint32_t FallbackFontFromCharcode(uint32_t charcode, bool* pVertGlyph);
Lei Zhang 2016/08/24 04:43:11 Keep these separate from the virtual methods?
npm 2016/08/24 14:39:22 Done.
+ int FallbackGlyphFromCharcode(int fallbackFont,
+ uint32_t charcode,
+ bool* pVertGlyph);
const CFX_ByteString& GetBaseFont() const { return m_BaseFont; }
CFX_SubstFont* GetSubstFont() const { return m_Font.GetSubstFont(); }
@@ -94,6 +98,7 @@ class CPDF_Font {
CPDF_Document* m_pDocument;
CFX_Font m_Font;
+ std::vector<std::unique_ptr<CFX_Font>> m_FontFallbacks;
protected:
CPDF_Font();

Powered by Google App Engine
This is Rietveld 408576698