public class FontMetrics
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private float |
afmVersion
This is the version of the FontMetrics.
|
private float |
ascender |
private float |
capHeight |
private int |
characters |
private java.lang.String |
characterSet |
private java.util.List<CharMetric> |
charMetrics |
private java.util.Map<java.lang.String,CharMetric> |
charMetricsMap |
private float[] |
charWidth |
private java.util.List<java.lang.String> |
comments |
private java.util.List<Composite> |
composites |
private float |
descender |
private java.lang.String |
encodingScheme |
private int |
escChar |
private java.lang.String |
familyName |
private BoundingBox |
fontBBox |
private java.lang.String |
fontName |
private java.lang.String |
fontVersion |
private java.lang.String |
fullName |
private boolean |
isBaseFont |
private boolean |
isFixedPitch |
private boolean |
isFixedV |
private float |
italicAngle |
private java.util.List<KernPair> |
kernPairs |
private java.util.List<KernPair> |
kernPairs0 |
private java.util.List<KernPair> |
kernPairs1 |
private int |
mappingScheme |
private int |
metricSets |
private java.lang.String |
notice |
private float |
standardHorizontalWidth |
private float |
standardVerticalWidth |
private java.util.List<TrackKern> |
trackKern |
private float |
underlinePosition |
private float |
underlineThickness |
private float[] |
vVector |
private java.lang.String |
weight |
private float |
xHeight |
Constructor and Description |
---|
FontMetrics()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCharMetric(CharMetric metric)
This will add another character metric.
|
void |
addComment(java.lang.String comment)
This will add a new comment.
|
void |
addComposite(Composite composite)
This will add a single composite part to the picture.
|
void |
addKernPair(KernPair kernPair)
This will add a kern pair.
|
void |
addKernPair0(KernPair kernPair)
This will add a kern pair.
|
void |
addKernPair1(KernPair kernPair)
This will add a kern pair.
|
void |
addTrackKern(TrackKern kern)
This will add another track kern.
|
float |
getAFMVersion()
This will get the version of the AFM document.
|
float |
getAscender()
Getter for property ascender.
|
float |
getAverageCharacterWidth()
This will get the average width of a character.
|
float |
getCapHeight()
Getter for property capHeight.
|
float |
getCharacterHeight(java.lang.String name)
This will get the width of a character.
|
int |
getCharacters()
Getter for property characters.
|
java.lang.String |
getCharacterSet()
Getter for property characterSet.
|
float |
getCharacterWidth(java.lang.String name)
This will get the width of a character.
|
java.util.List<CharMetric> |
getCharMetrics()
Getter for property charMetrics.
|
float[] |
getCharWidth()
Getter for property charWidth.
|
java.util.List<java.lang.String> |
getComments()
This will get all comments.
|
java.util.List<Composite> |
getComposites()
Getter for property composites.
|
float |
getDescender()
Getter for property descender.
|
java.lang.String |
getEncodingScheme()
Getter for property encodingScheme.
|
int |
getEscChar()
Getter for property escChar.
|
java.lang.String |
getFamilyName()
Getter for property familyName.
|
BoundingBox |
getFontBBox()
Getter for property fontBBox.
|
java.lang.String |
getFontName()
Getter for property fontName.
|
java.lang.String |
getFontVersion()
Getter for property fontVersion.
|
java.lang.String |
getFullName()
Getter for property fullName.
|
float |
getItalicAngle()
Getter for property italicAngle.
|
java.util.List<KernPair> |
getKernPairs()
Getter for property kernPairs.
|
java.util.List<KernPair> |
getKernPairs0()
Getter for property kernPairs0.
|
java.util.List<KernPair> |
getKernPairs1()
Getter for property kernPairs1.
|
int |
getMappingScheme()
Getter for property mappingScheme.
|
int |
getMetricSets()
This will get the metricSets attribute.
|
java.lang.String |
getNotice()
Getter for property notice.
|
float |
getStandardHorizontalWidth()
Getter for property standardHorizontalWidth.
|
float |
getStandardVerticalWidth()
Getter for property standardVerticalWidth.
|
java.util.List<TrackKern> |
getTrackKern()
Getter for property trackKern.
|
float |
getUnderlinePosition()
Getter for property underlinePosition.
|
float |
getUnderlineThickness()
Getter for property underlineThickness.
|
float[] |
getVVector()
Getter for property vVector.
|
java.lang.String |
getWeight()
Getter for property weight.
|
float |
getXHeight()
Getter for property xHeight.
|
boolean |
isBaseFont()
Getter for property isBaseFont.
|
boolean |
isFixedPitch()
Getter for property isFixedPitch.
|
boolean |
isFixedV()
Getter for property isFixedV.
|
void |
setAFMVersion(float afmVersionValue)
This will set the version of the AFM document.
|
void |
setAscender(float ascenderValue)
Setter for property ascender.
|
void |
setCapHeight(float capHeightValue)
Setter for property capHeight.
|
void |
setCharacters(int charactersValue)
Setter for property characters.
|
void |
setCharacterSet(java.lang.String characterSetValue)
Setter for property characterSet.
|
void |
setCharMetrics(java.util.List<CharMetric> charMetricsValue)
Setter for property charMetrics.
|
void |
setCharWidth(float[] charWidthValue)
Setter for property charWidth.
|
void |
setComposites(java.util.List<Composite> compositesList)
Setter for property composites.
|
void |
setDescender(float descenderValue)
Setter for property descender.
|
void |
setEncodingScheme(java.lang.String encodingSchemeValue)
Setter for property encodingScheme.
|
void |
setEscChar(int escCharValue)
Setter for property escChar.
|
void |
setFamilyName(java.lang.String familyNameValue)
Setter for property familyName.
|
void |
setFixedPitch(boolean isFixedPitchValue)
Setter for property isFixedPitch.
|
void |
setFontBBox(BoundingBox bBox)
Setter for property fontBBox.
|
void |
setFontName(java.lang.String name)
Setter for property fontName.
|
void |
setFontVersion(java.lang.String fontVersionValue)
Setter for property fontVersion.
|
void |
setFullName(java.lang.String fullNameValue)
Setter for property fullName.
|
void |
setIsBaseFont(boolean isBaseFontValue)
Setter for property isBaseFont.
|
void |
setIsFixedV(boolean isFixedVValue)
Setter for property isFixedV.
|
void |
setItalicAngle(float italicAngleValue)
Setter for property italicAngle.
|
void |
setKernPairs(java.util.List<KernPair> kernPairsList)
Setter for property kernPairs.
|
void |
setKernPairs0(java.util.List<KernPair> kernPairs0List)
Setter for property kernPairs0.
|
void |
setKernPairs1(java.util.List<KernPair> kernPairs1List)
Setter for property kernPairs1.
|
void |
setMappingScheme(int mappingSchemeValue)
Setter for property mappingScheme.
|
void |
setMetricSets(int metricSetsValue)
This will set the metricSets attribute.
|
void |
setNotice(java.lang.String noticeValue)
Setter for property notice.
|
void |
setStandardHorizontalWidth(float standardHorizontalWidthValue)
Setter for property standardHorizontalWidth.
|
void |
setStandardVerticalWidth(float standardVerticalWidthValue)
Setter for property standardVerticalWidth.
|
void |
setTrackKern(java.util.List<TrackKern> trackKernValue)
Setter for property trackKern.
|
void |
setUnderlinePosition(float underlinePositionValue)
Setter for property underlinePosition.
|
void |
setUnderlineThickness(float underlineThicknessValue)
Setter for property underlineThickness.
|
void |
setVVector(float[] vVectorValue)
Setter for property vVector.
|
void |
setWeight(java.lang.String weightValue)
Setter for property weight.
|
void |
setXHeight(float xHeightValue)
Setter for property xHeight.
|
private float afmVersion
private int metricSets
private java.lang.String fontName
private java.lang.String fullName
private java.lang.String familyName
private java.lang.String weight
private BoundingBox fontBBox
private java.lang.String fontVersion
private java.lang.String notice
private java.lang.String encodingScheme
private int mappingScheme
private int escChar
private java.lang.String characterSet
private int characters
private boolean isBaseFont
private float[] vVector
private boolean isFixedV
private float capHeight
private float xHeight
private float ascender
private float descender
private final java.util.List<java.lang.String> comments
private float underlinePosition
private float underlineThickness
private float italicAngle
private float[] charWidth
private boolean isFixedPitch
private float standardHorizontalWidth
private float standardVerticalWidth
private java.util.List<CharMetric> charMetrics
private java.util.Map<java.lang.String,CharMetric> charMetricsMap
private java.util.List<TrackKern> trackKern
private java.util.List<Composite> composites
private java.util.List<KernPair> kernPairs
private java.util.List<KernPair> kernPairs0
private java.util.List<KernPair> kernPairs1
public float getCharacterWidth(java.lang.String name)
name
- The character to get the width for.public float getCharacterHeight(java.lang.String name)
name
- The character to get the width for.public float getAverageCharacterWidth()
public void addComment(java.lang.String comment)
comment
- The comment to add to this metric.public java.util.List<java.lang.String> getComments()
public float getAFMVersion()
public int getMetricSets()
public void setAFMVersion(float afmVersionValue)
afmVersionValue
- The version of the document.public void setMetricSets(int metricSetsValue)
metricSetsValue
- The new metric sets attribute.java.lang.IllegalArgumentException
- If the metricSets attribute is not 0,1, or 2.public java.lang.String getFontName()
public void setFontName(java.lang.String name)
name
- New value of property fontName.public java.lang.String getFullName()
public void setFullName(java.lang.String fullNameValue)
fullNameValue
- New value of property fullName.public java.lang.String getFamilyName()
public void setFamilyName(java.lang.String familyNameValue)
familyNameValue
- New value of property familyName.public java.lang.String getWeight()
public void setWeight(java.lang.String weightValue)
weightValue
- New value of property weight.public BoundingBox getFontBBox()
public void setFontBBox(BoundingBox bBox)
bBox
- New value of property fontBBox.public java.lang.String getNotice()
public void setNotice(java.lang.String noticeValue)
noticeValue
- New value of property notice.public java.lang.String getEncodingScheme()
public void setEncodingScheme(java.lang.String encodingSchemeValue)
encodingSchemeValue
- New value of property encodingScheme.public int getMappingScheme()
public void setMappingScheme(int mappingSchemeValue)
mappingSchemeValue
- New value of property mappingScheme.public int getEscChar()
public void setEscChar(int escCharValue)
escCharValue
- New value of property escChar.public java.lang.String getCharacterSet()
public void setCharacterSet(java.lang.String characterSetValue)
characterSetValue
- New value of property characterSet.public int getCharacters()
public void setCharacters(int charactersValue)
charactersValue
- New value of property characters.public boolean isBaseFont()
public void setIsBaseFont(boolean isBaseFontValue)
isBaseFontValue
- New value of property isBaseFont.public float[] getVVector()
public void setVVector(float[] vVectorValue)
vVectorValue
- New value of property vVector.public boolean isFixedV()
public void setIsFixedV(boolean isFixedVValue)
isFixedVValue
- New value of property isFixedV.public float getCapHeight()
public void setCapHeight(float capHeightValue)
capHeightValue
- New value of property capHeight.public float getXHeight()
public void setXHeight(float xHeightValue)
xHeightValue
- New value of property xHeight.public float getAscender()
public void setAscender(float ascenderValue)
ascenderValue
- New value of property ascender.public float getDescender()
public void setDescender(float descenderValue)
descenderValue
- New value of property descender.public java.lang.String getFontVersion()
public void setFontVersion(java.lang.String fontVersionValue)
fontVersionValue
- New value of property fontVersion.public float getUnderlinePosition()
public void setUnderlinePosition(float underlinePositionValue)
underlinePositionValue
- New value of property underlinePosition.public float getUnderlineThickness()
public void setUnderlineThickness(float underlineThicknessValue)
underlineThicknessValue
- New value of property underlineThickness.public float getItalicAngle()
public void setItalicAngle(float italicAngleValue)
italicAngleValue
- New value of property italicAngle.public float[] getCharWidth()
public void setCharWidth(float[] charWidthValue)
charWidthValue
- New value of property charWidth.public boolean isFixedPitch()
public void setFixedPitch(boolean isFixedPitchValue)
isFixedPitchValue
- New value of property isFixedPitch.public java.util.List<CharMetric> getCharMetrics()
public void setCharMetrics(java.util.List<CharMetric> charMetricsValue)
charMetricsValue
- New value of property charMetrics.public void addCharMetric(CharMetric metric)
metric
- The character metric to add.public java.util.List<TrackKern> getTrackKern()
public void setTrackKern(java.util.List<TrackKern> trackKernValue)
trackKernValue
- New value of property trackKern.public void addTrackKern(TrackKern kern)
kern
- The track kerning data.public java.util.List<Composite> getComposites()
public void setComposites(java.util.List<Composite> compositesList)
compositesList
- New value of property composites.public void addComposite(Composite composite)
composite
- The composite info to add.public java.util.List<KernPair> getKernPairs()
public void addKernPair(KernPair kernPair)
kernPair
- The kern pair to add.public void setKernPairs(java.util.List<KernPair> kernPairsList)
kernPairsList
- New value of property kernPairs.public java.util.List<KernPair> getKernPairs0()
public void addKernPair0(KernPair kernPair)
kernPair
- The kern pair to add.public void setKernPairs0(java.util.List<KernPair> kernPairs0List)
kernPairs0List
- New value of property kernPairs0.public java.util.List<KernPair> getKernPairs1()
public void addKernPair1(KernPair kernPair)
kernPair
- The kern pair to add.public void setKernPairs1(java.util.List<KernPair> kernPairs1List)
kernPairs1List
- New value of property kernPairs1.public float getStandardHorizontalWidth()
public void setStandardHorizontalWidth(float standardHorizontalWidthValue)
standardHorizontalWidthValue
- New value of property standardHorizontalWidth.public float getStandardVerticalWidth()
public void setStandardVerticalWidth(float standardVerticalWidthValue)
standardVerticalWidthValue
- New value of property standardVerticalWidth.