public final class Type1Font extends FontData
| Modifier and Type | Method and Description |
|---|---|
int |
charCode2gid(int charCode) |
String |
charCode2GlyphName(int charCode) |
Subset |
createSubset()
Create a subset for this font.
|
CacheSupportInfo |
getCacheSupportInfo()
Return the CacheSupportInfo that this font matches
|
Rect |
getCoolTypeIcfBox()
Compute the IcfBox.
|
Rect |
getCoolTypeIdeoEmBox()
Compute the IdeoEmBox.
|
LineMetrics |
getCoolTypeLineMetrics()
Emulates the CoolType API CTFontDict:GetHorizontalMetrics CoolType API.
|
boolean |
getCoolTypeProportionalRomanFromFontProperties() |
Rect |
getCoolTypeRawFontBBox() |
CoolTypeScript |
getCoolTypeScript() |
UnderlineMetrics |
getCoolTypeUnderlineMetrics() |
Set |
getCSSFamilyNames()
Return the set of CSS font-family names that this font matches.
|
CSS20Attribute.CSSStretchValue |
getCSSStretchValue()
Return the CSS stretch associated with this font
|
int |
getCSSWeight()
Return the CSS weight of this font.
|
Permission |
getEmbeddingPermission(boolean wasEmbedded) |
Rect |
getFontBBox() |
URL |
getFontLocation() |
Matrix |
getFontMatrix()
The Type1 font matrix.
|
FXGFontDescription[] |
getFXGFontDescription(Platform platform,
ULocale locale)
Return the FXG descriptions for this font.
|
Rect |
getGlyphBBox(int gid)
Get the bounding box for a glyph, in metric space.
|
int |
getGlyphForChar(int usv)
Return the glyph to use to display a character.
|
String |
getGlyphName(int glyphID)
Fetch the glyphName associated with a given glyphID
|
void |
getGlyphOutline(int gid,
OutlineConsumer consumer)
Send a glyph's outline to an OutlineConsumer.
|
double |
getHorizontalAdvance(int glyphID)
Get the horizontal advance of the glyph
glyphID. |
double |
getKernValue(int leftGID,
int rightGID)
Get the horizontal kerning between two glyphs.
|
MetricFile |
getMetricFile() |
int |
getNumGlyphs()
Fetch the number of glyphs in the font
|
PDFFontDescription |
getPDFFontDescription(Font font) |
PlatformFontDescription[] |
getPlatformFontDescription(Platform platform,
ULocale locale)
Return the platform descriptions for this font.
|
PostscriptFontDescription[] |
getPostscriptFontDescription()
Return the postscript descriptions that this font matches.
|
String |
getPostscriptName()
Fetch the font name (aka Postscript name) for the font
|
String |
getPreferredCSSFamilyName()
Return the preferred name to be used in CSS.
|
ROS |
getROS() |
Scaler |
getScaler(ScanConverter c)
Get a scaler for this font, using a specific scan converter.
|
CatalogDescription |
getSelectionDescription() |
double |
getStemV()
Return the vertical stem width of the font.
|
SWFFont4Description |
getSWFFont4Description(boolean wasEmbedded) |
SWFFontDescription |
getSWFFontDescription(boolean wasEmbedded) |
double |
getUnitsPerEmX() |
double |
getUnitsPerEmY() |
XDCFontDescription |
getXDCFontDescription(Font font) |
int |
glyphName2gid(String glyphName)
Looks up a glyph by name and returns its glyphID
|
boolean |
isCSSStyleItalic()
Tell if the font matches the CSS font-style italic.
|
boolean |
isCSSStyleNormal()
Tell if the font matches the CSS font-style normal.
|
boolean |
isCSSStyleOblique()
Tell if the font matches the CSS font-style oblique.
|
boolean |
isCSSVariantNormal()
Tell if the font matches the CSS font-variant normal.
|
boolean |
isCSSVariantSmallCaps()
Tell if the font matches the CSS font-style small-caps.
|
boolean |
setMetricFile(MetricFile f)
This must be called only just after Type1Font construction
(prior to the Type1Font being visible to the client).
|
void |
stream(OutputStream out,
boolean openTypeOk) |
void |
subsetAndStream(Subset subset,
OutputStream out,
boolean preserveROS)
Subset and stream this font for PDF use.
|
void |
subsetAndStream(SubsetSimpleType1 t1Subset,
OutputStream out) |
getContainerFingerprint, getCoolTypeCapHeight, getCoolTypeFontBBox, getCoolTypeGlyphBBox, getCoolTypeGlyphForChar, getCoolTypeUnitsPerEm, getCoolTypeXHeight, getCSS20FontDescription, getLineMetrics, getPointSizeRange, getPreferredCSS20FontDescription, getScaler, hasCoolTypeProportionalRoman, isSymbolicpublic MetricFile getMetricFile()
public URL getFontLocation()
public boolean setMetricFile(MetricFile f)
f - the metric file that may be associated with this font.public int glyphName2gid(String glyphName)
glyphName - The name of the glyphpublic String charCode2GlyphName(int charCode)
public int charCode2gid(int charCode)
public int getNumGlyphs()
getNumGlyphs in class FontDatapublic ROS getROS()
public String getGlyphName(int glyphID)
public String getPostscriptName()
public double getStemV()
This horizontal metric is expressed in the metric space of the font.
public Matrix getFontMatrix()
public double getUnitsPerEmX()
getUnitsPerEmX in class FontDatapublic double getUnitsPerEmY()
getUnitsPerEmY in class FontDatapublic Rect getFontBBox()
getFontBBox in class FontDatapublic Rect getCoolTypeRawFontBBox()
public CoolTypeScript getCoolTypeScript() throws UnsupportedFontException, InvalidFontException
getCoolTypeScript in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic Rect getCoolTypeIdeoEmBox() throws InvalidFontException, UnsupportedFontException
getCoolTypeIdeoEmBox in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic Rect getCoolTypeIcfBox() throws InvalidFontException, UnsupportedFontException
This metric is expressed in the metric space of the font.
getCoolTypeIcfBox in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic LineMetrics getCoolTypeLineMetrics() throws UnsupportedFontException, InvalidFontException
This vertical metric is expressed in the metric space of the font.
See also the FontData.getLineMetrics() method.
getCoolTypeLineMetrics in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic UnderlineMetrics getCoolTypeUnderlineMetrics() throws UnsupportedFontException, InvalidFontException
getCoolTypeUnderlineMetrics in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic int getGlyphForChar(int usv)
throws InvalidFontException,
UnsupportedFontException
getGlyphForChar in class FontDatausv - the Unicode scalar value of the character;
(by definition, surrogate code points are not Unicode scalar values).InvalidFontExceptionUnsupportedFontExceptionpublic double getHorizontalAdvance(int glyphID)
throws InvalidGlyphException,
UnsupportedFontException
glyphID.
This horizontal metric is expressed in the metric space of the font.
getHorizontalAdvance in class FontDataInvalidGlyphExceptionUnsupportedFontExceptionpublic double getKernValue(int leftGID,
int rightGID)
throws InvalidFontException,
UnsupportedFontException
This horizontal metric is expressed in the metric space of the font.
public void getGlyphOutline(int gid,
OutlineConsumer consumer)
throws InvalidFontException,
UnsupportedFontException
FontDatagetGlyphOutline in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic Rect getGlyphBBox(int gid) throws UnsupportedFontException, InvalidFontException
getGlyphBBox in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic Scaler getScaler(ScanConverter c) throws InvalidFontException, UnsupportedFontException
FontDatagetScaler in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic Set getCSSFamilyNames()
public String getPreferredCSSFamilyName()
FontDatapublic boolean isCSSStyleNormal()
public boolean isCSSStyleItalic()
public boolean isCSSStyleOblique()
public boolean isCSSVariantNormal()
public boolean isCSSVariantSmallCaps()
public int getCSSWeight()
public CSS20Attribute.CSSStretchValue getCSSStretchValue()
public CacheSupportInfo getCacheSupportInfo() throws InvalidFontException, UnsupportedFontException
FontDatagetCacheSupportInfo in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic PostscriptFontDescription[] getPostscriptFontDescription()
FontDatagetPostscriptFontDescription in class FontDatapublic FXGFontDescription[] getFXGFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException
FontDatagetFXGFontDescription in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic PlatformFontDescription[] getPlatformFontDescription(Platform platform, ULocale locale) throws InvalidFontException, UnsupportedFontException
FontDatagetPlatformFontDescription in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic PDFFontDescription getPDFFontDescription(Font font)
getPDFFontDescription in class FontDatapublic XDCFontDescription getXDCFontDescription(Font font)
getXDCFontDescription in class FontDatapublic boolean getCoolTypeProportionalRomanFromFontProperties()
throws InvalidFontException
getCoolTypeProportionalRomanFromFontProperties in class FontDataInvalidFontExceptionpublic Permission getEmbeddingPermission(boolean wasEmbedded)
getEmbeddingPermission in class FontDatapublic Subset createSubset() throws UnsupportedFontException, InvalidFontException
FontDatacreateSubset in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic void subsetAndStream(Subset subset, OutputStream out, boolean preserveROS) throws InvalidFontException, UnsupportedFontException, IOException
subsetAndStream in class FontDataout - the OutputStream to which the bytes are streamedpreserveROS - tells whether to preserve the cid -> gid mappingInvalidFontExceptionUnsupportedFontExceptionIOExceptionpublic void subsetAndStream(SubsetSimpleType1 t1Subset, OutputStream out) throws InvalidFontException, UnsupportedFontException, IOException
public void stream(OutputStream out, boolean openTypeOk) throws InvalidFontException, UnsupportedFontException, IOException
public CatalogDescription getSelectionDescription() throws InvalidFontException, UnsupportedFontException
getSelectionDescription in class FontDataInvalidFontExceptionUnsupportedFontExceptionpublic SWFFontDescription getSWFFontDescription(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
getSWFFontDescription in class FontDataUnsupportedFontExceptionInvalidFontExceptionpublic SWFFont4Description getSWFFont4Description(boolean wasEmbedded) throws UnsupportedFontException, InvalidFontException
getSWFFont4Description in class FontDataUnsupportedFontExceptionInvalidFontExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved