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

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

Issue 2248923002: Revert of SkPDF: unify drawText and drawPosText (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | 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 8
9 #ifndef SkPDFFont_DEFINED 9 #ifndef SkPDFFont_DEFINED
10 #define SkPDFFont_DEFINED 10 #define SkPDFFont_DEFINED
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool hasGlyph(uint16_t glyphID); 99 bool hasGlyph(uint16_t glyphID);
100 100
101 /** Convert (in place) the input glyph IDs into the font encoding. If the 101 /** Convert (in place) the input glyph IDs into the font encoding. If the
102 * font has more glyphs than can be encoded (like a type 1 font with more 102 * font has more glyphs than can be encoded (like a type 1 font with more
103 * than 255 glyphs) this method only converts up to the first out of range 103 * than 255 glyphs) this method only converts up to the first out of range
104 * glyph ID. 104 * glyph ID.
105 * @param glyphIDs The input text as glyph IDs. 105 * @param glyphIDs The input text as glyph IDs.
106 * @param numGlyphs The number of input glyphs. 106 * @param numGlyphs The number of input glyphs.
107 * @return Returns the number of glyphs consumed. 107 * @return Returns the number of glyphs consumed.
108 */ 108 */
109 int glyphsToPDFFontEncoding(SkGlyphID* glyphIDs, int numGlyphs) const; 109 int glyphsToPDFFontEncoding(uint16_t* glyphIDs, int numGlyphs);
110 /**
111 * Like above, but does not modify glyphIDs array.
112 */
113 int glyphsToPDFFontEncodingCount(const SkGlyphID* glyphIDs,
114 int numGlyphs) const;
115 110
116 /** Get the font resource for the passed typeface and glyphID. The 111 /** Get the font resource for the passed typeface and glyphID. The
117 * reference count of the object is incremented and it is the caller's 112 * reference count of the object is incremented and it is the caller's
118 * responsibility to unreference it when done. This is needed to 113 * responsibility to unreference it when done. This is needed to
119 * accommodate the weak reference pattern used when the returned object 114 * accommodate the weak reference pattern used when the returned object
120 * is new and has no other references. 115 * is new and has no other references.
121 * @param typeface The typeface to find. 116 * @param typeface The typeface to find.
122 * @param glyphID Specify which section of a large font is of interest. 117 * @param glyphID Specify which section of a large font is of interest.
123 */ 118 */
124 static SkPDFFont* GetFontResource(SkPDFCanon* canon, 119 static SkPDFFont* GetFontResource(SkPDFCanon* canon,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 uint16_t fLastGlyphID; 200 uint16_t fLastGlyphID;
206 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; 201 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo;
207 sk_sp<SkPDFDict> fDescriptor; 202 sk_sp<SkPDFDict> fDescriptor;
208 203
209 SkAdvancedTypefaceMetrics::FontType fFontType; 204 SkAdvancedTypefaceMetrics::FontType fFontType;
210 205
211 typedef SkPDFDict INHERITED; 206 typedef SkPDFDict INHERITED;
212 }; 207 };
213 208
214 #endif 209 #endif
OLDNEW
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698