类 GlyphRenumberer
java.lang.Object
com.google.typography.font.tools.subsetter.GlyphRenumberer
A utility class for applying a mapping to glyph number references within a
TrueType composite glyph object.
- 作者:
- Raph Levien
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static int
compositeReferenceSize
(int flags) Compute the size, in bytes, of a single composite reference.private static boolean
isCompositeGlyph
(ReadableFontData glyph) Determine whether the glyph data is a composite glyph.private static ReadableFontData
renumberCompositeGlyph
(ReadableFontData glyph, Map<Integer, Integer> mapping) static ReadableFontData
renumberGlyph
(ReadableFontData glyph, Map<Integer, Integer> mapping) Apply a renumbering referenced glyphs in TrueType glyph data.
-
构造器详细资料
-
GlyphRenumberer
public GlyphRenumberer()
-
-
方法详细资料
-
renumberGlyph
Apply a renumbering referenced glyphs in TrueType glyph data. Note that this method has a low level interface (bytes) for efficiency, as, in many cases the glyph data does not need to be fully parsed. We should benchmark this implementation against one written in terms of a higher level interface and measure the actual performance gain - if not significant, this implementation should be scrapped in favor of the higher level one.- 参数:
glyph
-mapping
-- 返回:
- renumbered glyph data
-
isCompositeGlyph
Determine whether the glyph data is a composite glyph. Should always give the same answer asparsedGlyph instanceof GlyphTable.CompositeGlyph
, but faster.- 参数:
glyph
-- 返回:
- true if glyph is composite
-
renumberCompositeGlyph
private static ReadableFontData renumberCompositeGlyph(ReadableFontData glyph, Map<Integer, Integer> mapping) -
compositeReferenceSize
private static int compositeReferenceSize(int flags) Compute the size, in bytes, of a single composite reference.
-