public final class CIDKeyedFont extends CFFFont
| Constructor and Description |
|---|
CIDKeyedFont(String name,
Dict topDict,
CharStrings charStrings,
int numGlyphs,
Dict ciddict,
Dict privateDict) |
CIDKeyedFont(String name,
Dict topDict,
CharStrings charStrings,
int numGlyphs,
Dict cidDict,
Dict privateDict,
CharStrings lSubrs,
CharStrings gSubrs)
This constructor is called from Glyf.subsetAndStreamForCFF
and is by the new TT->CFF-IdentityCID code for DF4.
|
| Modifier and Type | Method and Description |
|---|---|
int |
cid2gid(int cid) |
Subset |
createSubset()
Create a subset for this font.
|
int |
getCIDCount() |
LineMetrics |
getCoolTypeLineMetrics()
Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.
|
Permission |
getEmbeddingPermission(boolean wasEmbedded) |
int |
getFirstChar() |
Rect |
getFontBBox() |
Matrix |
getFontMatrix() |
Matrix |
getFontMatrix(int component)
Allows recover of concatenated font matrix from a CID component.
|
int |
getGlyphCid(int gid)
Return the CID of the glyph
gid. |
int |
getGlyphForChar(int usv)
Return the glyph to use to display a character.
|
String |
getGlyphName(int gid)
Return the name of glyph
gid. |
void |
getGlyphOutline(int gid,
OutlineConsumer consumer)
Get the outline of glyph
gid. |
double |
getHorizontalAdvance(int gid)
Get the horizontal advance of a glyph.
|
int |
getLastChar() |
int |
getNumGlyphs()
Return the number of glyphs in this font.
|
void |
getOutline(int gid,
Type2OutlineParser parser,
OutlineConsumer consumer)
Return the outline of glyph
gid. |
PDFFontDescription |
getPDFFontDescription(Font font) |
Rect |
getRawFontBBox() |
ROS |
getROS()
Get the ROS associated with this font.
|
double |
getStemVForGlyph(int gid) |
XDCFontDescription |
getXDCFontDescription(Font font) |
void |
stream(OutputStream out,
Integer fsType) |
void |
subsetAndStream(Subset subset,
OutputStream out,
boolean preserveROS,
Integer fsType)
A version of subsetAndStream that can take an fsType value to be added to the
fonts postscript string.
|
void |
subsetAndStream(Subset subset,
OutputStream out,
boolean preserveROS,
Integer fsType,
boolean enableSubrizer) |
void |
subsetAndStream(Subset subset,
OutputStream out,
boolean preserveROS,
Integer fsType,
boolean enableSubrizer,
boolean rebuildCharstrings)
Added yet another boolean to make this code serve on the new TT->CFF-IdentityCID path for DF4.
|
getCacheSupportInfo, getCoolTypeIcfBox, getCoolTypeIdeoEmBox, getCoolTypeProportionalRomanFromFontProperties, getCoolTypeScript, getCoolTypeUnderlineMetrics, getCoolTypeUnderlineMetrics, getCSSFamilyNames, getCSSStretchValue, getCSSWeight, getFXGFontDescription, getGlyphBBox, getName, getPlatformFontDescription, getPostscriptFontDescription, getPreferredCSSFamilyName, getScaler, getSelectionDescription, getSWFFont4Description, getSWFFontDescription, getUnitsPerEmX, getUnitsPerEmY, isCSSStyleItalic, isCSSStyleNormal, isCSSStyleOblique, isCSSVariantNormal, isCSSVariantSmallCaps, isFixedPitch, subsetAndStreamgetContainerFingerprint, getCoolTypeCapHeight, getCoolTypeFontBBox, getCoolTypeGlyphBBox, getCoolTypeGlyphForChar, getCoolTypeUnitsPerEm, getCoolTypeXHeight, getCSS20FontDescription, getLineMetrics, getPointSizeRange, getPreferredCSS20FontDescription, getScaler, hasCoolTypeProportionalRoman, isSymbolicpublic CIDKeyedFont(String name, Dict topDict, CharStrings charStrings, int numGlyphs, Dict ciddict, Dict privateDict) throws InvalidFontException, UnsupportedFontException
public CIDKeyedFont(String name, Dict topDict, CharStrings charStrings, int numGlyphs, Dict cidDict, Dict privateDict, CharStrings lSubrs, CharStrings gSubrs) throws InvalidFontException, UnsupportedFontException
public Subset createSubset() throws InvalidFontException, UnsupportedFontException
createSubset in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic int getNumGlyphs()
FontDatagetNumGlyphs in class FontDatapublic String getGlyphName(int gid)
gid.
Since glyphs in CID-keyed font don't have names, we return null.getGlyphName in class CFFFontpublic ROS getROS()
CFFFontpublic int getCIDCount()
public int getGlyphCid(int gid)
throws InvalidFontException,
UnsupportedFontException
gid.getGlyphCid in class CFFFontInvalidFontExceptionUnsupportedFontExceptionpublic int cid2gid(int cid)
throws InvalidFontException,
UnsupportedFontException
public void getGlyphOutline(int gid,
OutlineConsumer consumer)
throws InvalidFontException,
UnsupportedFontException
gid.getGlyphOutline in class CFFFontgid - the glyph id of the glyphconsumer - the OutlineConsumer to receive the outlineInvalidFontExceptionUnsupportedFontExceptionpublic void getOutline(int gid,
Type2OutlineParser parser,
OutlineConsumer consumer)
throws InvalidFontException,
UnsupportedFontException
gid.getOutline in class CFFFontInvalidFontExceptionUnsupportedFontExceptionpublic double getStemVForGlyph(int gid)
throws InvalidFontException
getStemVForGlyph in class CFFFontInvalidFontExceptionpublic Matrix getFontMatrix()
getFontMatrix in class CFFFontpublic Matrix getFontMatrix(int component)
public double getHorizontalAdvance(int gid)
throws InvalidFontException,
UnsupportedFontException
getHorizontalAdvance in class CFFFontInvalidFontExceptionUnsupportedFontExceptionpublic Rect getRawFontBBox()
public Rect getFontBBox() throws InvalidFontException, UnsupportedFontException
getFontBBox in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic LineMetrics getCoolTypeLineMetrics() throws UnsupportedFontException, InvalidFontException
The metrics are expressed in the design space of the font, i.e. they need to be converted through the metrics matrix.
This methods never returns null.
See also the FontData.getLineMetrics() method.
getCoolTypeLineMetrics in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic int getFirstChar()
throws InvalidFontException,
UnsupportedFontException
public int getLastChar()
throws InvalidFontException,
UnsupportedFontException
public int getGlyphForChar(int usv)
throws InvalidFontException,
UnsupportedFontException
getGlyphForChar in class CFFFontusv - the Unicode scalar value of the character;
(by definition, surrogate code points are not Unicode scalar values).InvalidFontExceptionUnsupportedFontExceptionpublic Permission getEmbeddingPermission(boolean wasEmbedded)
getEmbeddingPermission in class FontDatapublic void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS, Integer fsType) throws InvalidFontException, UnsupportedFontException, IOException
CFFFontsubsetAndStream in class CFFFontfsType - if non-null an integer as described in technote 5147
http://partners.adobe.com/public/developer/en/acrobat/sdk/FontPolicies.pdf
"Font Embedding Guidelines for Adobe Third-party Developers".InvalidFontExceptionUnsupportedFontExceptionIOExceptionpublic void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS, Integer fsType, boolean enableSubrizer) throws InvalidFontException, UnsupportedFontException, IOException
public void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS, Integer fsType, boolean enableSubrizer, boolean rebuildCharstrings) throws InvalidFontException, UnsupportedFontException, IOException
public PDFFontDescription getPDFFontDescription(Font font) throws UnsupportedFontException, InvalidFontException
getPDFFontDescription in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic XDCFontDescription getXDCFontDescription(Font font) throws UnsupportedFontException, InvalidFontException
getXDCFontDescription in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic void stream(OutputStream out, Integer fsType) throws InvalidFontException, UnsupportedFontException, IOException
stream in class CFFFontInvalidFontExceptionUnsupportedFontExceptionIOExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved