summaryrefslogtreecommitdiff
path: root/poppler/GlobalParams.cc
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/GlobalParams.cc')
-rw-r--r--poppler/GlobalParams.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 7da1232a..874cdc93 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -903,7 +903,7 @@ GooString *GlobalParams::findFontFile(const std::string &fontName)
static bool supportedFontForEmbedding(Unicode uChar, const char *filepath, int faceIndex)
{
- if (!GooString::endsWith(filepath, ".ttf") && !GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, ".otf")) {
+ if (!std::string_view(filepath).ends_with(".ttf") && !std::string_view(filepath).ends_with(".ttc") && !std::string_view(filepath).ends_with(".otf")) {
// for now we only support ttf, ttc, otf fonts
return false;
}
@@ -1248,9 +1248,9 @@ GooString *GlobalParams::findSystemFontFile(const GfxFont *font, SysFontType *ty
// Set the type of font. Fonts returned by AFontMatcher are of
// four possible types - ttf, otf, ttc, otc.
- if (path->endsWith(".ttf") || path->endsWith(".otf")) {
+ if (path->ends_with(".ttf") || path->ends_with(".otf")) {
*type = sysFontTTF;
- } else if (path->endsWith(".ttc") || path->endsWith(".otc")) {
+ } else if (path->ends_with(".ttc") || path->ends_with(".otc")) {
*type = sysFontTTC;
}
# else