Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: src/pdf/SkPDFFont.cpp

Issue 2250763002: SkPDF: Font names need escaping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFont.cpp
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp
index 6d8f09c2471a10d3dd4bcdcc8ed5cba6079fb98a..5cc80b04ec814f34398f89d3934e1b06075cdeb1 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -756,7 +756,7 @@ bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) {
SkAdvancedTypefaceMetrics::FontType type = this->getType();
SkTypeface* face = this->typeface();
SkASSERT(face);
- const char* name = metrics.fFontName.c_str();
+ const SkString& name = metrics.fFontName;
auto descriptor = sk_make_sp<SkPDFDict>("FontDescriptor");
add_common_font_descriptor_entries(descriptor.get(), metrics, 0);
@@ -785,7 +785,7 @@ bool SkPDFType0Font::populate(const SkPDFGlyphSet* subset) {
subset->exportTo(&glyphIDs);
}
sk_sp<SkPDFObject> subsetStream = get_subset_font_stream(
- std::move(fontAsset), glyphIDs, name);
+ std::move(fontAsset), glyphIDs, name.c_str());
if (subsetStream) {
descriptor->insertObjRef("FontFile2", std::move(subsetStream));
break;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698