OLD | NEW |
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 (GOOGLE3) |
28 #if !defined (SK_BUILD_FOR_ANDROID) | 28 #if !defined (SK_BUILD_FOR_ANDROID) && !defined (SK_BUILD_FOR_IOS) |
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 #define SK_SFNTLY_SUBSETTER // For the benefit of #ifdefs below. |
32 #endif | 32 #endif |
33 #elif defined (SK_SFNTLY_SUBSETTER) | 33 #elif defined (SK_SFNTLY_SUBSETTER) |
34 #include SK_SFNTLY_SUBSETTER | 34 #include SK_SFNTLY_SUBSETTER |
35 #endif | 35 #endif |
36 | 36 |
37 // PDF's notion of symbolic vs non-symbolic is related to the character set, not | 37 // 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 | 38 // symbols vs. characters. Rarely is a font the right character set to call it |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 SkAutoTUnref<const SkAdvancedTypefaceMetrics> fontMetrics( | 1428 SkAutoTUnref<const SkAdvancedTypefaceMetrics> fontMetrics( |
1429 face->getAdvancedTypefaceMetrics( | 1429 face->getAdvancedTypefaceMetrics( |
1430 SkTypeface::kNo_PerGlyphInfo, nullptr, 0)); | 1430 SkTypeface::kNo_PerGlyphInfo, nullptr, 0)); |
1431 if (fontMetrics) { | 1431 if (fontMetrics) { |
1432 canEmbed = !SkToBool( | 1432 canEmbed = !SkToBool( |
1433 fontMetrics->fFlags & | 1433 fontMetrics->fFlags & |
1434 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag); | 1434 SkAdvancedTypefaceMetrics::kNotEmbeddable_FontFlag); |
1435 } | 1435 } |
1436 return *canon->fCanEmbedTypeface.set(id, canEmbed); | 1436 return *canon->fCanEmbedTypeface.set(id, canEmbed); |
1437 } | 1437 } |
OLD | NEW |