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

Unified Diff: src/pdf/SkPDFFont.cpp

Issue 2146403005: SkPDF: Always give a default advance for glyphs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « gm/skbug_5321.cpp ('k') | 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 0fce0b98d6d757e195c2a9648464ebcfd9a5f104..f088ed5941d1e0e026cb4e2cdb030f2c5c358488 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -1137,13 +1137,11 @@ bool SkPDFCIDFont::populate(const SkPDFGlyphSet* subset) {
sk_sp<SkPDFArray> widths(composeAdvanceData(
fontInfo()->fGlyphWidths, fontInfo()->fEmSize, &appendWidth,
&defaultWidth));
- if (widths->size())
+ if (widths->size()) {
this->insertObject("W", std::move(widths));
- if (defaultWidth != 0) {
- this->insertScalar(
- "DW",
- scaleFromFontUnits(defaultWidth, fontInfo()->fEmSize));
}
+ this->insertScalar(
+ "DW", scaleFromFontUnits(defaultWidth, fontInfo()->fEmSize));
}
if (!fontInfo()->fVerticalMetrics.empty()) {
struct SkAdvancedTypefaceMetrics::VerticalMetric defaultAdvance;
« no previous file with comments | « gm/skbug_5321.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698