summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index 53186daec6..193ee4a331 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -290,6 +290,7 @@ int CPDF_Font::GetStringWidth(const char* pString, int size) {
return width;
}
+// static
CPDF_Font* CPDF_Font::GetStockFont(CPDF_Document* pDoc,
const CFX_ByteStringC& name) {
CFX_ByteString fontname(name);
@@ -469,3 +470,9 @@ int CPDF_Font::FallbackGlyphFromCharcode(int fallbackFont, uint32_t charcode) {
return glyph;
}
+
+CFX_Font* CPDF_Font::GetFontFallback(int position) {
+ if (position < 0 || static_cast<size_t>(position) >= m_FontFallbacks.size())
+ return nullptr;
+ return m_FontFallbacks[position].get();
+}