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

Side by Side Diff: include/core/SkAdvancedTypefaceMetrics.h

Issue 107863002: [PDF] Fix font embedding restrictions. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix Mac Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkAdvancedTypefaceMetrics_DEFINED 10 #ifndef SkAdvancedTypefaceMetrics_DEFINED
(...skipping 17 matching lines...) Expand all
28 SK_DECLARE_INST_COUNT(SkAdvancedTypefaceMetrics) 28 SK_DECLARE_INST_COUNT(SkAdvancedTypefaceMetrics)
29 29
30 SkString fFontName; 30 SkString fFontName;
31 31
32 enum FontType { 32 enum FontType {
33 kType1_Font, 33 kType1_Font,
34 kType1CID_Font, 34 kType1CID_Font,
35 kCFF_Font, 35 kCFF_Font,
36 kTrueType_Font, 36 kTrueType_Font,
37 kOther_Font, 37 kOther_Font,
38 kNotEmbeddable_Font
39 }; 38 };
40 // The type of the underlying font program. This field determines which 39 // The type of the underlying font program. This field determines which
41 // of the following fields are valid. If it is kOther_Font or 40 // of the following fields are valid. If it is kOther_Font the per glyph
42 // kNotEmbeddable_Font, the per glyph information will never be populated. 41 // information will never be populated.
43 FontType fType; 42 FontType fType;
44 43
45 // fMultiMaster may be true for Type1_Font or CFF_Font. 44 enum FontFlags {
46 bool fMultiMaster; 45 kEmpty_FontFlag = 0x0, //!<No flags set
46 kMultiMaster_FontFlag = 0x1, //!<May be true for Type1 or CFF fonts.
47 kNotEmbeddable_FontFlag = 0x2, //!<May not be embedded.
48 kNotSubsettable_FontFlag = 0x4, //!<May not be subset.
49 };
50 // Global font flags.
51 FontFlags fFlags;
52
47 uint16_t fLastGlyphID; // The last valid glyph ID in the font. 53 uint16_t fLastGlyphID; // The last valid glyph ID in the font.
48 uint16_t fEmSize; // The size of the em box (defines font units). 54 uint16_t fEmSize; // The size of the em box (defines font units).
49 55
50 // These enum values match the values used in the PDF file format. 56 // These enum values match the values used in the PDF file format.
51 enum StyleFlags { 57 enum StyleFlags {
52 kFixedPitch_Style = 0x00001, 58 kFixedPitch_Style = 0x00001,
53 kSerif_Style = 0x00002, 59 kSerif_Style = 0x00002,
54 kScript_Style = 0x00008, 60 kScript_Style = 0x00008,
55 kItalic_Style = 0x00040, 61 kItalic_Style = 0x00040,
56 kAllCaps_Style = 0x10000, 62 kAllCaps_Style = 0x10000,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData( 153 SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData(
148 FontHandle fontHandle, 154 FontHandle fontHandle,
149 int num_glyphs, 155 int num_glyphs,
150 const uint32_t* glyphIDs, 156 const uint32_t* glyphIDs,
151 uint32_t glyphIDsCount, 157 uint32_t glyphIDsCount,
152 bool (*getAdvance)(FontHandle fontHandle, int gId, Data* data)); 158 bool (*getAdvance)(FontHandle fontHandle, int gId, Data* data));
153 159
154 } // namespace skia_advanced_typeface_metrics_utils 160 } // namespace skia_advanced_typeface_metrics_utils
155 161
156 #endif 162 #endif
OLDNEW
« no previous file with comments | « gyp/core.gyp ('k') | include/pdf/SkPDFDocument.h » ('j') | src/ports/SkFontHost_win.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698