summaryrefslogtreecommitdiff
path: root/core/fxge/cfx_font.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /core/fxge/cfx_font.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
Convert string class names
Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxge/cfx_font.cpp')
-rw-r--r--core/fxge/cfx_font.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 7a51df1b85..017b120dd4 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -291,7 +291,7 @@ void CFX_Font::DeleteFace() {
m_Face = nullptr;
}
-void CFX_Font::LoadSubst(const CFX_ByteString& face_name,
+void CFX_Font::LoadSubst(const ByteString& face_name,
bool bTrueType,
uint32_t flags,
int weight,
@@ -446,7 +446,7 @@ bool CFX_Font::IsItalic() const {
if (FXFT_Is_Face_Italic(m_Face) == FXFT_STYLE_FLAG_ITALIC)
return true;
- CFX_ByteString str(FXFT_Get_Face_Style_Name(m_Face));
+ ByteString str(FXFT_Get_Face_Style_Name(m_Face));
str.MakeLower();
return str.Contains("italic");
}
@@ -459,31 +459,31 @@ bool CFX_Font::IsFixedWidth() const {
return m_Face && FXFT_Is_Face_fixedwidth(m_Face) != 0;
}
-CFX_ByteString CFX_Font::GetPsName() const {
+ByteString CFX_Font::GetPsName() const {
if (!m_Face)
- return CFX_ByteString();
+ return ByteString();
- CFX_ByteString psName = FXFT_Get_Postscript_Name(m_Face);
+ ByteString psName = FXFT_Get_Postscript_Name(m_Face);
if (psName.IsEmpty())
psName = "Untitled";
return psName;
}
-CFX_ByteString CFX_Font::GetFamilyName() const {
+ByteString CFX_Font::GetFamilyName() const {
if (!m_Face && !m_pSubstFont)
- return CFX_ByteString();
+ return ByteString();
if (m_Face)
- return CFX_ByteString(FXFT_Get_Face_Family_Name(m_Face));
+ return ByteString(FXFT_Get_Face_Family_Name(m_Face));
return m_pSubstFont->m_Family;
}
-CFX_ByteString CFX_Font::GetFaceName() const {
+ByteString CFX_Font::GetFaceName() const {
if (!m_Face && !m_pSubstFont)
- return CFX_ByteString();
+ return ByteString();
if (m_Face) {
- CFX_ByteString style = CFX_ByteString(FXFT_Get_Face_Style_Name(m_Face));
- CFX_ByteString facename = GetFamilyName();
+ ByteString style = ByteString(FXFT_Get_Face_Style_Name(m_Face));
+ ByteString facename = GetFamilyName();
if (facename.IsEmpty())
facename = "Untitled";
if (!style.IsEmpty() && style != "Regular")