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

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

Issue 1561753002: In Google3 build, use SK_SFNTLY_SUBSETTER define to enable/disable sfntly. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 11 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 | « BUILD.public ('k') | 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 <ctype.h> 8 #include <ctype.h>
9 9
10 #include "SkData.h" 10 #include "SkData.h"
11 #include "SkGlyphCache.h" 11 #include "SkGlyphCache.h"
12 #include "SkPaint.h" 12 #include "SkPaint.h"
13 #include "SkPDFCanon.h" 13 #include "SkPDFCanon.h"
14 #include "SkPDFDevice.h" 14 #include "SkPDFDevice.h"
15 #include "SkPDFFont.h" 15 #include "SkPDFFont.h"
16 #include "SkPDFFontImpl.h" 16 #include "SkPDFFontImpl.h"
17 #include "SkPDFStream.h" 17 #include "SkPDFStream.h"
18 #include "SkPDFTypes.h" 18 #include "SkPDFTypes.h"
19 #include "SkPDFUtils.h" 19 #include "SkPDFUtils.h"
20 #include "SkRefCnt.h" 20 #include "SkRefCnt.h"
21 #include "SkScalar.h" 21 #include "SkScalar.h"
22 #include "SkStream.h" 22 #include "SkStream.h"
23 #include "SkTypefacePriv.h" 23 #include "SkTypefacePriv.h"
24 #include "SkTypes.h" 24 #include "SkTypes.h"
25 #include "SkUtils.h" 25 #include "SkUtils.h"
26 26
27 #if defined (GOOGLE3) 27 #if defined (SK_SFNTLY_SUBSETTER)
28 #if !defined (SK_BUILD_FOR_ANDROID) && !defined (SK_BUILD_FOR_IOS) 28 #if defined (GOOGLE3)
29 // #including #defines doesn't work with this build system. 29 // #including #defines doesn't work with this build system.
30 #include "typography/font/sfntly/src/sample/chromium/font_subsetter.h" 30 #include "typography/font/sfntly/src/sample/chromium/font_subsetter.h"
31 #define SK_SFNTLY_SUBSETTER // For the benefit of #ifdefs below. 31 #else
32 #include SK_SFNTLY_SUBSETTER
32 #endif 33 #endif
33 #elif defined (SK_SFNTLY_SUBSETTER)
34 #include SK_SFNTLY_SUBSETTER
35 #endif 34 #endif
36 35
37 // PDF's notion of symbolic vs non-symbolic is related to the character set, not 36 // PDF's notion of symbolic vs non-symbolic is related to the character set, not
38 // symbols vs. characters. Rarely is a font the right character set to call it 37 // symbols vs. characters. Rarely is a font the right character set to call it
39 // non-symbolic, so always call it symbolic. (PDF 1.4 spec, section 5.7.1) 38 // non-symbolic, so always call it symbolic. (PDF 1.4 spec, section 5.7.1)
40 static const int kPdfSymbolic = 4; 39 static const int kPdfSymbolic = 4;
41 40
42 namespace { 41 namespace {
43 42
44 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 SkAutoTUnref<const SkAdvancedTypefaceMetrics> fontMetrics( 1427 SkAutoTUnref<const SkAdvancedTypefaceMetrics> fontMetrics(
1429 face->getAdvancedTypefaceMetrics( 1428 face->getAdvancedTypefaceMetrics(
1430 SkTypeface::kNo_PerGlyphInfo, nullptr, 0)); 1429 SkTypeface::kNo_PerGlyphInfo, nullptr, 0));
1431 if (fontMetrics) { 1430 if (fontMetrics) {
1432 canEmbed = !SkToBool( 1431 canEmbed = !SkToBool(
1433 fontMetrics->fFlags & 1432 fontMetrics->fFlags &
1434 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag); 1433 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag);
1435 } 1434 }
1436 return *canon->fCanEmbedTypeface.set(id, canEmbed); 1435 return *canon->fCanEmbedTypeface.set(id, canEmbed);
1437 } 1436 }
OLDNEW
« no previous file with comments | « BUILD.public ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698