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

Unified Diff: src/pdf/SkPDFFont.h

Issue 2327953002: SkPDF: refactor & code cleanup ahead of https://crrev.com/2322403002 (Closed)
Patch Set: comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFDevice.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFont.h
diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h
index 9f33819ed84fc501014e0cb0b15ae6e39ffd4faa..a14ae63572a50ace489883d2785432072222a96e 100644
--- a/src/pdf/SkPDFFont.h
+++ b/src/pdf/SkPDFFont.h
@@ -40,6 +40,8 @@ public:
*/
SkAdvancedTypefaceMetrics::FontType getType() const { return fFontType; }
+ static SkAdvancedTypefaceMetrics::FontType FontType(const SkAdvancedTypefaceMetrics&);
+
static bool IsMultiByte(SkAdvancedTypefaceMetrics::FontType type) {
return type == SkAdvancedTypefaceMetrics::kType1CID_Font ||
type == SkAdvancedTypefaceMetrics::kTrueType_Font;
@@ -65,24 +67,6 @@ public:
return gid - fFirstGlyphID + 1;
}
- /** Count the number of glyphIDs that can be encoded with this font.
- * glyphIDs > maxGlyphID are considered okay. */
- int countStretch(const SkGlyphID* glyphIDs,
- int numGlyphs,
- SkGlyphID maxGlyphID) const {
- if (this->multiByteGlyphs()) {
- return numGlyphs;
- }
- for (int i = 0; i < numGlyphs; i++) {
- SkGlyphID gid = glyphIDs[i];
- if (gid != 0 && gid <= maxGlyphID &&
- (gid < fFirstGlyphID || gid > fLastGlyphID)) {
- return i;
- }
- }
- return numGlyphs;
- }
-
void noteGlyphUsage(SkGlyphID glyph) {
SkASSERT(this->hasGlyph(glyph));
fGlyphUsage.set(glyph);
« 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