diff options
author | thestig <thestig@chromium.org> | 2016-06-01 20:18:41 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-01 20:18:41 -0700 |
commit | a31d4a90f3446df76d8d3ffa0b441db0ad4623af (patch) | |
tree | b66f6dafdb562a4aa5ec7364028c00e888836f20 /core/fxge/ge/fx_ge_font.cpp | |
parent | dbdcb81a82cd9e46023a3ee500df75717c1a47b4 (diff) | |
download | pdfium-a31d4a90f3446df76d8d3ffa0b441db0ad4623af.tar.xz |
Change CFX_Font::GetPsName() to return a CFX_ByteString.
So everyone can avoid doing Byte to WideString conversions.
Also remove CFX_GEFont::GetPsName() and deduplicate a couple of
GetPsName() calls.
Review-Url: https://codereview.chromium.org/2019173002
Diffstat (limited to 'core/fxge/ge/fx_ge_font.cpp')
-rw-r--r-- | core/fxge/ge/fx_ge_font.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/core/fxge/ge/fx_ge_font.cpp b/core/fxge/ge/fx_ge_font.cpp index 144228ff28..ba53be7ab5 100644 --- a/core/fxge/ge/fx_ge_font.cpp +++ b/core/fxge/ge/fx_ge_font.cpp @@ -356,17 +356,16 @@ FX_BOOL CFX_Font::IsFixedWidth() const { return FXFT_Is_Face_fixedwidth(m_Face); } -CFX_WideString CFX_Font::GetPsName() const { - if (!m_Face) { - return CFX_WideString(); - } - CFX_WideString psName = - CFX_WideString::FromLocal(FXFT_Get_Postscript_Name(m_Face)); - if (psName.IsEmpty()) { - psName = CFX_WideString::FromLocal("Untitled"); - } +CFX_ByteString CFX_Font::GetPsName() const { + if (!m_Face) + return CFX_ByteString(); + + CFX_ByteString psName = FXFT_Get_Postscript_Name(m_Face); + if (psName.IsEmpty()) + psName = "Untitled"; return psName; } + CFX_ByteString CFX_Font::GetFamilyName() const { if (!m_Face && !m_pSubstFont) { return CFX_ByteString(); |