summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_edittext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_edittext.cpp')
-rw-r--r--fpdfsdk/fpdf_edittext.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_edittext.cpp b/fpdfsdk/fpdf_edittext.cpp
index 2ead789204..8186d8d894 100644
--- a/fpdfsdk/fpdf_edittext.cpp
+++ b/fpdfsdk/fpdf_edittext.cpp
@@ -462,6 +462,16 @@ FPDF_EXPORT FPDF_FONT FPDF_CALLCONV FPDFText_LoadFont(FPDF_DOCUMENT document,
: LoadSimpleFont(pDoc, std::move(pFont), data, size, font_type));
}
+FPDF_EXPORT FPDF_FONT FPDF_CALLCONV
+FPDFText_LoadStandardFont(FPDF_DOCUMENT document, FPDF_BYTESTRING font) {
+ CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
+ if (!pDoc)
+ return nullptr;
+
+ return FPDFFontFromCPDFFont(
+ CPDF_Font::GetStockFont(pDoc, ByteStringView(font)));
+}
+
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
unsigned int R,