summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cba_fontmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cba_fontmap.cpp')
-rw-r--r--fpdfsdk/formfiller/cba_fontmap.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp
index d8d7dffd69..08a3021a73 100644
--- a/fpdfsdk/formfiller/cba_fontmap.cpp
+++ b/fpdfsdk/formfiller/cba_fontmap.cpp
@@ -218,12 +218,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(ByteString* sAlias) {
CPDF_DefaultAppearance appearance(sDA);
float font_size;
Optional<ByteString> font = appearance.GetFont(&font_size);
- if (font) {
- ByteString sDecodedFontName = PDF_NameDecode(font->AsStringView());
- *sAlias = sDecodedFontName.Right(sDecodedFontName.GetLength() - 1);
- } else {
- *sAlias = ByteString();
- }
+ *sAlias = font.value_or(ByteString());
CPDF_Dictionary* pFontDict = nullptr;
if (CPDF_Dictionary* pAPDict = m_pAnnotDict->GetDictFor("AP")) {