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

Unified Diff: src/pdf/SkPDFFont.h

Issue 842253003: SkPDFCanon (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: did you mean struct here? Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pdf/SkPDFCanon.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 27f1b5bfe3c35e169b1be72d2fca30516f32460d..cf2daa0fdf683daf6f1ce607a68d2d0a5dcec784 100644
--- a/src/pdf/SkPDFFont.h
+++ b/src/pdf/SkPDFFont.h
@@ -139,6 +139,17 @@ public:
*/
virtual SkPDFFont* getFontSubset(const SkPDFGlyphSet* usage);
+ enum Match {
+ kExact_Match,
+ kRelated_Match,
+ kNot_Match,
+ };
+ static Match IsMatch(SkPDFFont* existingFont,
+ uint32_t existingFontID,
+ uint16_t existingGlyphID,
+ uint32_t searchFontID,
+ uint16_t searchGlyphID);
+
protected:
// Common constructor to handle common members.
SkPDFFont(const SkAdvancedTypefaceMetrics* fontInfo, SkTypeface* typeface,
@@ -178,17 +189,6 @@ protected:
static bool Find(uint32_t fontID, uint16_t glyphID, int* index);
private:
- class FontRec {
- public:
- SkPDFFont* fFont;
- uint32_t fFontID;
- uint16_t fGlyphID;
-
- // A fGlyphID of 0 with no fFont always matches.
- bool operator==(const FontRec& b) const;
- FontRec(SkPDFFont* font, uint32_t fontID, uint16_t fGlyphID);
- };
-
SkAutoTUnref<SkTypeface> fTypeface;
// The glyph IDs accessible with this font. For Type1 (non CID) fonts,
@@ -201,9 +201,6 @@ private:
SkAdvancedTypefaceMetrics::FontType fFontType;
- // This should be made a hash table if performance is a problem.
- static SkTDArray<FontRec>& CanonicalFonts();
- static SkBaseMutex& CanonicalFontsMutex();
typedef SkPDFDict INHERITED;
};
« no previous file with comments | « src/pdf/SkPDFCanon.cpp ('k') | src/pdf/SkPDFFont.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698