public abstract class FontData extends Object
These objects are immutable.
| Constructor and Description |
|---|
FontData(byte[] digest) |
| Modifier and Type | Method and Description |
|---|---|
abstract Subset |
createSubset()
Create a subset for this font.
|
abstract CacheSupportInfo |
getCacheSupportInfo()
Return the CacheSupportInfo that this font matches
|
byte[] |
getContainerFingerprint() |
double |
getCoolTypeCapHeight()
Returns the CoolTypeCapHeight of this font.
|
Rect |
getCoolTypeFontBBox() |
Rect |
getCoolTypeGlyphBBox(int glyphID) |
int |
getCoolTypeGlyphForChar(int unicodeScalarValue)
Return the glyph used by CoolType for a character.
|
abstract Rect |
getCoolTypeIcfBox() |
abstract Rect |
getCoolTypeIdeoEmBox() |
abstract LineMetrics |
getCoolTypeLineMetrics()
Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.
|
abstract boolean |
getCoolTypeProportionalRomanFromFontProperties() |
abstract CoolTypeScript |
getCoolTypeScript() |
abstract UnderlineMetrics |
getCoolTypeUnderlineMetrics() |
double |
getCoolTypeUnitsPerEm() |
double |
getCoolTypeXHeight() |
CSS20FontDescription[] |
getCSS20FontDescription() |
abstract Permission |
getEmbeddingPermission(boolean wasEmbedded) |
abstract Rect |
getFontBBox() |
abstract FXGFontDescription[] |
getFXGFontDescription(Platform platform,
ULocale locale)
Return the FXG descriptions for this font.
|
abstract Rect |
getGlyphBBox(int gid)
Get the bounding box of a glyph.
|
abstract int |
getGlyphForChar(int unicodeScalarValue)
Return the glyph to use to display a character.
|
abstract void |
getGlyphOutline(int gid,
OutlineConsumer consumer)
Send a glyph's outline to an OutlineConsumer.
|
abstract double |
getHorizontalAdvance(int gid)
Get the horizontal advance of a glyph.
|
LineMetrics |
getLineMetrics()
Return the line metrics for this font.
|
abstract int |
getNumGlyphs()
Return the number of glyphs in this font.
|
abstract PDFFontDescription |
getPDFFontDescription(Font font) |
abstract PlatformFontDescription[] |
getPlatformFontDescription(Platform platform,
ULocale locale)
Return the platform descriptions for this font.
|
double[] |
getPointSizeRange()
Return the range of point sizes for which this font has been designed.
|
abstract PostscriptFontDescription[] |
getPostscriptFontDescription()
Return the postscript descriptions that this font matches.
|
CSS20FontDescription |
getPreferredCSS20FontDescription() |
Scaler |
getScaler()
Get a scaler for this font.
|
abstract Scaler |
getScaler(ScanConverter c)
Get a scaler for this font, using a specific scan converter.
|
abstract CatalogDescription |
getSelectionDescription() |
abstract SWFFont4Description |
getSWFFont4Description(boolean wasEmbedded) |
abstract SWFFontDescription |
getSWFFontDescription(boolean wasEmbedded) |
abstract double |
getUnitsPerEmX() |
abstract double |
getUnitsPerEmY() |
abstract XDCFontDescription |
getXDCFontDescription(Font font) |
boolean |
hasCoolTypeProportionalRoman()
Determines whether a font has proportional roman, as defined by CoolType.
|
boolean |
isSymbolic()
Tell whether this font is symbolic.
|
abstract void |
subsetAndStream(Subset subset,
OutputStream out,
boolean preserveROS)
Subset and stream this font for PDF use.
|
public byte[] getContainerFingerprint()
public abstract int getNumGlyphs()
throws InvalidFontException,
UnsupportedFontException
public boolean isSymbolic()
throws UnsupportedFontException,
InvalidFontException
public abstract double getUnitsPerEmX()
throws UnsupportedFontException,
InvalidFontException
public abstract double getUnitsPerEmY()
throws UnsupportedFontException,
InvalidFontException
public double getCoolTypeUnitsPerEm()
throws UnsupportedFontException,
InvalidFontException
public abstract Rect getFontBBox() throws InvalidFontException, UnsupportedFontException
public Rect getCoolTypeFontBBox() throws InvalidFontException, UnsupportedFontException
public abstract CoolTypeScript getCoolTypeScript() throws UnsupportedFontException, InvalidFontException
public double getCoolTypeCapHeight()
throws UnsupportedFontException,
InvalidFontException
UnsupportedFontExceptionInvalidFontExceptionpublic double getCoolTypeXHeight()
throws UnsupportedFontException,
InvalidFontException
public abstract Rect getCoolTypeIdeoEmBox() throws UnsupportedFontException, InvalidFontException
public abstract Rect getCoolTypeIcfBox() throws UnsupportedFontException, InvalidFontException
public Rect getCoolTypeGlyphBBox(int glyphID) throws UnsupportedFontException, InvalidFontException
public abstract LineMetrics getCoolTypeLineMetrics() throws UnsupportedFontException, InvalidFontException
See also the getLineMetrics() method.
public LineMetrics getLineMetrics() throws UnsupportedFontException, InvalidFontException
Some font formats do not support the notion of line metrics, and in those cases, this method returns null.
See also the getCoolTypeLineMetrics() method.
public abstract UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException
public boolean hasCoolTypeProportionalRoman()
throws InvalidFontException,
UnsupportedFontException
InvalidFontExceptionUnsupportedFontExceptionpublic abstract boolean getCoolTypeProportionalRomanFromFontProperties()
throws InvalidFontException
InvalidFontExceptionpublic abstract int getGlyphForChar(int unicodeScalarValue)
throws InvalidFontException,
UnsupportedFontException
unicodeScalarValue - the Unicode scalar value of the character;
(by definition, surrogate code points are not Unicode scalar values).InvalidFontExceptionUnsupportedFontExceptionpublic int getCoolTypeGlyphForChar(int unicodeScalarValue)
throws InvalidFontException,
UnsupportedFontException
public abstract double getHorizontalAdvance(int gid)
throws InvalidGlyphException,
UnsupportedFontException,
InvalidFontException
public abstract void getGlyphOutline(int gid,
OutlineConsumer consumer)
throws InvalidFontException,
UnsupportedFontException
public abstract Rect getGlyphBBox(int gid) throws UnsupportedFontException, InvalidFontException
public Scaler getScaler() throws InvalidFontException, UnsupportedFontException
public abstract Scaler getScaler(ScanConverter c) throws InvalidFontException, UnsupportedFontException
public abstract SWFFontDescription getSWFFontDescription(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
public abstract SWFFont4Description getSWFFont4Description(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
public abstract Permission getEmbeddingPermission(boolean wasEmbedded) throws InvalidFontException, UnsupportedFontException
public abstract PDFFontDescription getPDFFontDescription(Font font) throws UnsupportedFontException, InvalidFontException
public abstract XDCFontDescription getXDCFontDescription(Font font) throws UnsupportedFontException, InvalidFontException
public abstract Subset createSubset() throws InvalidFontException, UnsupportedFontException
public abstract void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS) throws InvalidFontException, UnsupportedFontException, IOException
out - the OutputStream to which the bytes are streamedpreserveROS - tells whether to preserve the cid -> gid mappingInvalidFontExceptionUnsupportedFontExceptionIOExceptionpublic abstract CacheSupportInfo getCacheSupportInfo() throws UnsupportedFontException, InvalidFontException
public abstract PostscriptFontDescription[] getPostscriptFontDescription() throws InvalidFontException, UnsupportedFontException
public abstract FXGFontDescription[] getFXGFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException
public abstract PlatformFontDescription[] getPlatformFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException
public double[] getPointSizeRange()
throws InvalidFontException,
UnsupportedFontException
InvalidFontExceptionUnsupportedFontExceptionpublic CSS20FontDescription[] getCSS20FontDescription() throws InvalidFontException, UnsupportedFontException
public CSS20FontDescription getPreferredCSS20FontDescription() throws InvalidFontException, UnsupportedFontException
public abstract CatalogDescription getSelectionDescription() throws InvalidFontException, UnsupportedFontException
Copyright © 2010 - 2020 Adobe. All Rights Reserved