diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-31 17:22:28 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-31 17:22:28 +0000 |
commit | a1e077900dd8b33fb7ea368c01f3d8ebcb42d9cd (patch) | |
tree | a6ab9774939c3292073d18ff8aabfb93933cec85 /skia/include | |
parent | 82875d6d6604fb5563a69456b810205b8e14bb64 (diff) | |
download | chromium_src-a1e077900dd8b33fb7ea368c01f3d8ebcb42d9cd.zip chromium_src-a1e077900dd8b33fb7ea368c01f3d8ebcb42d9cd.tar.gz chromium_src-a1e077900dd8b33fb7ea368c01f3d8ebcb42d9cd.tar.bz2 |
Revert "..."
This reverts commit r12868. I used the wrong commit and messed up the message.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12870 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia/include')
-rw-r--r-- | skia/include/SkFontHost.h | 28 | ||||
-rw-r--r-- | skia/include/SkScalerContext.h | 12 |
2 files changed, 2 insertions, 38 deletions
diff --git a/skia/include/SkFontHost.h b/skia/include/SkFontHost.h index c3b2e2d..73010e7 100644 --- a/skia/include/SkFontHost.h +++ b/skia/include/SkFontHost.h @@ -26,32 +26,8 @@ class SkWStream; /** \class SkFontHost - This class is ported to each environment. It is responsible for bridging - the gap between the (sort of) abstract class SkTypeface and the - platform-specific implementation that provides access to font files. - - One basic task is for each create (subclass of) SkTypeface, the FontHost is - resonsible for assigning a uniqueID. The ID should be unique for the - underlying font file/data, not unique per typeface instance. Thus it is - possible/common to request a typeface for the same font more than once - (e.g. asking for the same font by name several times). The FontHost may - return seperate typeface instances in that case, or it may choose to use a - cache and return the same instance (but calling typeface->ref(), since the - caller is always responsible for calling unref() on each instance that is - returned). Either way, the fontID for those instance(s) will be the same. - In addition, the fontID should never be set to 0. That value is used as a - sentinel to indicate no-font-id. - - The major aspects are: - 1) Given either a name/style, return a subclass of SkTypeface that - references the closest matching font available on the host system. - 2) Given the data for a font (either in a stream or a file name), return - a typeface that allows access to that data. - 3) Each typeface instance carries a 32bit ID for its corresponding font. - SkFontHost turns that ID into a stream to access the font's data. - 4) Given a font ID, return a subclass of SkScalerContext, which connects a - font scaler (e.g. freetype or other) to the font's data. - 5) Utilites to manage the font cache (budgeting) and gamma correction + This class is ported to each environment. It is responsible for bridging the gap + between SkTypeface and the resulting platform-specific instance of SkScalerContext. */ class SkFontHost { public: diff --git a/skia/include/SkScalerContext.h b/skia/include/SkScalerContext.h index df846f2..ec2cd0d 100644 --- a/skia/include/SkScalerContext.h +++ b/skia/include/SkScalerContext.h @@ -85,12 +85,6 @@ struct SkGlyph { size_t computeImageSize() const; - /** Call this to set all of the metrics fields to 0 (e.g. if the scaler - encounters an error measuring a glyph). Note: this does not alter the - fImage, fPath, fID, fMaskFormat fields. - */ - void zeroMetrics(); - enum { kSubBits = 2, kSubMask = ((1 << kSubBits) - 1), @@ -169,16 +163,10 @@ public: SkScalerContext(const SkDescriptor* desc); virtual ~SkScalerContext(); - // remember our glyph offset/base void setBaseGlyphCount(unsigned baseGlyphCount) { fBaseGlyphCount = baseGlyphCount; } - /** Return the corresponding glyph for the specified unichar. Since contexts - may be chained (under the hood), the glyphID that is returned may in - fact correspond to a different font/context. In that case, we use the - base-glyph-count to know how to translate back into local glyph space. - */ uint16_t charToGlyphID(SkUnichar uni); unsigned getGlyphCount() const { return this->generateGlyphCount(); } |