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

Unified Diff: src/ports/SkFontHost_FreeType.cpp

Issue 2246903002: SkPDF: SkPDFFont class changes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-08-15 (Monday) 21:25:47 EDT 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 | « src/pdf/SkPDFFont.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_FreeType.cpp
diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp
index 5c3034162d29b29c5f0fc8e43bf28290bf8940bd..6681c9c1ef4f42b0a448cebf644a7c14ac6f6c0c 100644
--- a/src/ports/SkFontHost_FreeType.cpp
+++ b/src/ports/SkFontHost_FreeType.cpp
@@ -464,20 +464,15 @@ SkAdvancedTypefaceMetrics* SkTypeface_FreeType::onGetAdvancedTypefaceMetrics(
SkAdvancedTypefaceMetrics* info = new SkAdvancedTypefaceMetrics;
info->fFontName.set(FT_Get_Postscript_Name(face));
- info->fFlags = SkAdvancedTypefaceMetrics::kEmpty_FontFlag;
+
if (FT_HAS_MULTIPLE_MASTERS(face)) {
- info->fFlags = SkTBitOr<SkAdvancedTypefaceMetrics::FontFlags>(
- info->fFlags, SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag);
+ info->fFlags |= SkAdvancedTypefaceMetrics::kMultiMaster_FontFlag;
}
if (!canEmbed(face)) {
- info->fFlags = SkTBitOr<SkAdvancedTypefaceMetrics::FontFlags>(
- info->fFlags,
- SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag);
+ info->fFlags |= SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag;
}
if (!canSubset(face)) {
- info->fFlags = SkTBitOr<SkAdvancedTypefaceMetrics::FontFlags>(
- info->fFlags,
- SkAdvancedTypefaceMetrics::kNotSubsettable_FontFlag);
+ info->fFlags |= SkAdvancedTypefaceMetrics::kNotSubsettable_FontFlag;
}
info->fLastGlyphID = face->num_glyphs - 1;
info->fEmSize = 1000;
@@ -499,7 +494,7 @@ SkAdvancedTypefaceMetrics* SkTypeface_FreeType::onGetAdvancedTypefaceMetrics(
info->fType = SkAdvancedTypefaceMetrics::kOther_Font;
}
- info->fStyle = 0;
+ info->fStyle = (SkAdvancedTypefaceMetrics::StyleFlags)0;
if (FT_IS_FIXED_WIDTH(face)) {
info->fStyle |= SkAdvancedTypefaceMetrics::kFixedPitch_Style;
}
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698