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

Unified Diff: src/ports/SkTypeface_win_dw.cpp

Issue 334443002: [PDF] Fix font embedding restrictions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 6 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/ports/SkFontHost_win.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkTypeface_win_dw.cpp
diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp
index 9eace8b4a07e29581fb978b8d8a90c7e48266189..6ff84128580eb48b6e123f3618a6e041e682ea07 100644
--- a/src/ports/SkTypeface_win_dw.cpp
+++ b/src/ports/SkTypeface_win_dw.cpp
@@ -361,9 +361,9 @@ SkAdvancedTypefaceMetrics* DWriteFontTypeface::onGetAdvancedTypefaceMetrics(
info = new SkAdvancedTypefaceMetrics;
info->fEmSize = dwfm.designUnitsPerEm;
- info->fMultiMaster = false;
info->fLastGlyphID = SkToU16(glyphCount - 1);
info->fStyle = 0;
+ info->fFlags = SkAdvancedTypefaceMetrics::kEmpty_FontFlag;
// SkAdvancedTypefaceMetrics::fFontName is in theory supposed to be
// the PostScript name of the font. However, due to the way it is currently
@@ -467,12 +467,7 @@ SkAdvancedTypefaceMetrics* DWriteFontTypeface::onGetAdvancedTypefaceMetrics(
}
*/
- // If Restricted, the font may not be embedded in a document.
- // If not Restricted, the font can be embedded.
- // If PreviewPrint, the embedding is read-only.
- if (os2Table->version.v0.fsType.field.Restricted) {
- info->fType = SkAdvancedTypefaceMetrics::kNotEmbeddable_Font;
- } else if (perGlyphInfo & SkAdvancedTypefaceMetrics::kHAdvance_PerGlyphInfo) {
+ if (perGlyphInfo & SkAdvancedTypefaceMetrics::kHAdvance_PerGlyphInfo) {
if (fixedWidth) {
appendRange(&info->fGlyphWidths, 0);
int16_t advance;
« no previous file with comments | « src/ports/SkFontHost_win.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698