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

Side by Side Diff: src/pdf/SkPDFFont.cpp

Issue 2272103002: SkPDF: set SK_SFNTLY_SUBSETTER uniformly (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkGlyphCache.h" 9 #include "SkGlyphCache.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
11 #include "SkPDFCanon.h" 11 #include "SkPDFCanon.h"
12 #include "SkPDFConvertType1FontStream.h" 12 #include "SkPDFConvertType1FontStream.h"
13 #include "SkPDFDevice.h" 13 #include "SkPDFDevice.h"
14 #include "SkPDFMakeCIDGlyphWidthsArray.h" 14 #include "SkPDFMakeCIDGlyphWidthsArray.h"
15 #include "SkPDFMakeToUnicodeCmap.h" 15 #include "SkPDFMakeToUnicodeCmap.h"
16 #include "SkPDFFont.h" 16 #include "SkPDFFont.h"
17 #include "SkPDFUtils.h" 17 #include "SkPDFUtils.h"
18 #include "SkRefCnt.h" 18 #include "SkRefCnt.h"
19 #include "SkScalar.h" 19 #include "SkScalar.h"
20 #include "SkStream.h" 20 #include "SkStream.h"
21 #include "SkTypefacePriv.h" 21 #include "SkTypefacePriv.h"
22 #include "SkTypes.h" 22 #include "SkTypes.h"
23 #include "SkUtils.h" 23 #include "SkUtils.h"
24 24
25 #if defined (SK_SFNTLY_SUBSETTER) 25 #if defined (SK_SFNTLY_SUBSETTER)
26 #if defined (GOOGLE3) 26 #if defined (GOOGLE3)
27 // #including #defines doesn't work with this build system. 27 // #including #defines doesn't work with this build system.
28 #include "typography/font/sfntly/src/sample/chromium/font_subsetter.h" 28 #include "sample/chromium/font_subsetter.h"
29 #else 29 #else
30 #include SK_SFNTLY_SUBSETTER 30 #include SK_SFNTLY_SUBSETTER
31 #endif 31 #endif
32 #endif 32 #endif
33 33
34 namespace { 34 namespace {
35 // PDF's notion of symbolic vs non-symbolic is related to the character set, not 35 // PDF's notion of symbolic vs non-symbolic is related to the character set, not
36 // symbols vs. characters. Rarely is a font the right character set to call it 36 // symbols vs. characters. Rarely is a font the right character set to call it
37 // non-symbolic, so always call it symbolic. (PDF 1.4 spec, section 5.7.1) 37 // non-symbolic, so always call it symbolic. (PDF 1.4 spec, section 5.7.1)
38 static const int kPdfSymbolic = 4; 38 static const int kPdfSymbolic = 4;
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 755
756 bool SkPDFFont::CanEmbedTypeface(SkTypeface* typeface, SkPDFCanon* canon) { 756 bool SkPDFFont::CanEmbedTypeface(SkTypeface* typeface, SkPDFCanon* canon) {
757 const SkAdvancedTypefaceMetrics* metrics = SkPDFFont::GetMetrics(typeface, c anon); 757 const SkAdvancedTypefaceMetrics* metrics = SkPDFFont::GetMetrics(typeface, c anon);
758 return metrics && can_embed(*metrics); 758 return metrics && can_embed(*metrics);
759 } 759 }
760 760
761 void SkPDFFont::drop() { 761 void SkPDFFont::drop() {
762 fTypeface = nullptr; 762 fTypeface = nullptr;
763 this->SkPDFDict::drop(); 763 this->SkPDFDict::drop();
764 } 764 }
OLDNEW
« 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