|
fop 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.fonts.Typeface
org.apache.fop.fonts.CustomFont
org.apache.fop.fonts.CIDFont
org.apache.fop.fonts.MultiByteFont
public class MultiByteFont
Generic MultiByte (CID) font
Field Summary | |
---|---|
protected java.awt.Rectangle[] |
boundingBoxes
Contains the character bounding boxes for all characters in the font |
protected CIDSet |
cidSet
|
Fields inherited from class org.apache.fop.fonts.CIDFont |
---|
width |
Fields inherited from class org.apache.fop.fonts.CustomFont |
---|
cmap |
Fields inherited from class org.apache.fop.fonts.Typeface |
---|
eventListener, NOT_FOUND |
Constructor Summary | |
---|---|
MultiByteFont(InternalResourceResolver resourceResolver,
EmbeddingMode embeddingMode)
Default constructor |
Method Summary | |
---|---|
protected void |
addPrivateUseMapping(int pu,
int gi)
Add a private use mapping {PU,GI} to the existing character map. |
int |
findGlyphIndex(int c)
Returns the glyph index for a Unicode character. |
java.awt.Rectangle |
getBoundingBox(int glyphIndex,
int size)
Returns the bounding box of the glyph at the given index, for the given font size. |
protected char[] |
getChars()
|
CIDSet |
getCIDSet()
Returns the subset information for this font. |
CIDFontType |
getCIDType()
Returns the type of the CID font. |
java.io.InputStream |
getCmapStream()
|
int |
getDefaultWidth()
Returns the default width for this font. |
java.lang.String |
getEmbedFontName()
Returns the font name for font embedding (may include a prefix, Example: "1E28bcArialMT"). |
java.lang.String |
getEncodingName()
Get the encoding of the font. |
GlyphDefinitionTable |
getGDEF()
Obtain glyph definition table. |
protected java.util.BitSet |
getGlyphIndices()
|
GlyphPositioningTable |
getGPOS()
Obtain glyph positioning table. |
GlyphSubstitutionTable |
getGSUB()
Obtain glyph substitution table. |
java.lang.String |
getOrdering()
Returns a font name for use within a registry. |
java.lang.String |
getRegistry()
Returns the name of the issuer of the font. |
int |
getSupplement()
Returns the supplement number of the character collection. |
java.lang.String |
getTTCName()
Returns the TrueType Collection Name. |
protected int[] |
getUnscaledWidths(GlyphSequence gs)
|
java.util.LinkedHashMap<java.lang.Integer,java.lang.String> |
getUsedGlyphNames()
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
getUsedGlyphs()
Returns a Map of used Glyphs. |
int |
getWidth(int i,
int size)
Return the width (in 1/1000ths of point size) of the character at code point i. |
int[] |
getWidths()
Return the array of widths. |
java.util.Map<java.lang.Integer,java.lang.Integer> |
getWidthsMap()
|
boolean |
hasChar(char c)
Determines whether this font contains a particular character/glyph. |
boolean |
hasFeature(int tableType,
java.lang.String script,
java.lang.String language,
java.lang.String feature)
Determine if metrics supports specific feature in specified font table. |
boolean |
isEmbeddable()
Indicates if this font may be embedded. |
boolean |
isOTFFile()
|
boolean |
isSubsetEmbedded()
Indicates whether this font is subset embedded. |
char |
mapChar(char c)
Map a Unicode character to a code point in the font. |
void |
mapUsedGlyphName(int gid,
java.lang.String value)
|
int[][] |
performPositioning(java.lang.CharSequence cs,
java.lang.String script,
java.lang.String language)
Perform glyph positioning using an implied font size. |
int[][] |
performPositioning(java.lang.CharSequence cs,
java.lang.String script,
java.lang.String language,
int fontSize)
Perform glyph positioning. |
boolean |
performsPositioning()
Determines if font performs glyph positioning. |
boolean |
performsSubstitution()
Determines if font performs glyph substitution. |
java.lang.CharSequence |
performSubstitution(java.lang.CharSequence cs,
java.lang.String script,
java.lang.String language,
java.util.List associations,
boolean retainControls)
Perform substitutions on characters to effect glyph substitution. |
java.lang.CharSequence |
reorderCombiningMarks(java.lang.CharSequence cs,
int[][] gpa,
java.lang.String script,
java.lang.String language,
java.util.List associations)
Reorder combining marks in character sequence so that they precede (within the sequence) the base character to which they are applied. |
void |
setBBoxArray(java.awt.Rectangle[] boundingBoxes)
Sets the bounding boxes array. |
void |
setCIDType(CIDFontType cidType)
Sets the CIDType. |
void |
setDefaultWidth(int defaultWidth)
Sets the defaultWidth. |
void |
setGDEF(GlyphDefinitionTable gdef)
Establishes the glyph definition table. |
void |
setGPOS(GlyphPositioningTable gpos)
Establishes the glyph positioning table. |
void |
setGSUB(GlyphSubstitutionTable gsub)
Establishes the glyph substitution table. |
void |
setIsOTFFile(boolean isOTFFile)
|
void |
setTTCName(java.lang.String ttcName)
Sets the the TrueType Collection Name. |
void |
setWidthArray(int[] wds)
Sets the width array. |
Methods inherited from class org.apache.fop.fonts.CIDFont |
---|
isMultiByte |
Methods inherited from class org.apache.fop.fonts.Typeface |
---|
getMaxAscent, hadMappingOperations, notifyMapOperation, setEventListener, toString, warnMissingGlyph |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.fop.fonts.FontMetrics |
---|
getMaxAscent |
Field Detail |
---|
protected final CIDSet cidSet
protected java.awt.Rectangle[] boundingBoxes
Constructor Detail |
---|
public MultiByteFont(InternalResourceResolver resourceResolver, EmbeddingMode embeddingMode)
Method Detail |
---|
public int getDefaultWidth()
getDefaultWidth
in class CIDFont
public java.lang.String getRegistry()
getRegistry
in class CIDFont
public java.lang.String getOrdering()
getOrdering
in class CIDFont
public int getSupplement()
getSupplement
in class CIDFont
public CIDFontType getCIDType()
getCIDType
in class CIDFont
public void setIsOTFFile(boolean isOTFFile)
public boolean isOTFFile()
public void setCIDType(CIDFontType cidType)
cidType
- The cidType to setpublic java.lang.String getEmbedFontName()
getEmbedFontName
in interface FontMetrics
getEmbedFontName
in class CustomFont
public boolean isEmbeddable()
isEmbeddable
in interface FontDescriptor
public boolean isSubsetEmbedded()
FontDescriptor
isSubsetEmbedded
in interface FontDescriptor
public CIDSet getCIDSet()
getCIDSet
in class CIDFont
public void mapUsedGlyphName(int gid, java.lang.String value)
public java.util.LinkedHashMap<java.lang.Integer,java.lang.String> getUsedGlyphNames()
public java.lang.String getEncodingName()
getEncodingName
in class Typeface
public int getWidth(int i, int size)
getWidth
in interface FontMetrics
i
- code point indexsize
- font size
public int[] getWidths()
This is used to get an array for inserting in an output format. It should not be used for lookup.
getWidths
in interface FontMetrics
public java.awt.Rectangle getBoundingBox(int glyphIndex, int size)
FontMetrics
getBoundingBox
in interface FontMetrics
glyphIndex
- glyph indexsize
- font size
public int findGlyphIndex(int c)
c
- the Unicode character index
protected void addPrivateUseMapping(int pu, int gi)
protected java.util.BitSet getGlyphIndices()
protected char[] getChars()
public char mapChar(char c)
mapChar
in class Typeface
c
- character to map
public boolean hasChar(char c)
hasChar
in class Typeface
c
- character to check
public void setDefaultWidth(int defaultWidth)
defaultWidth
- The defaultWidth to setpublic java.lang.String getTTCName()
public void setTTCName(java.lang.String ttcName)
ttcName
- the TrueType Collection Namepublic void setWidthArray(int[] wds)
wds
- array of widths.public void setBBoxArray(java.awt.Rectangle[] boundingBoxes)
boundingBoxes
- array of bounding boxes.public java.util.Map<java.lang.Integer,java.lang.Integer> getUsedGlyphs()
public void setGDEF(GlyphDefinitionTable gdef)
gdef
- the glyph definition table to be used by this fontpublic GlyphDefinitionTable getGDEF()
public void setGSUB(GlyphSubstitutionTable gsub)
gsub
- the glyph substitution table to be used by this fontpublic GlyphSubstitutionTable getGSUB()
public void setGPOS(GlyphPositioningTable gpos)
gpos
- the glyph positioning table to be used by this fontpublic GlyphPositioningTable getGPOS()
public boolean performsSubstitution()
performsSubstitution
in interface Substitutable
public java.lang.CharSequence performSubstitution(java.lang.CharSequence cs, java.lang.String script, java.lang.String language, java.util.List associations, boolean retainControls)
performSubstitution
in interface Substitutable
cs
- character sequence to map to output font encoding character sequencescript
- a script identifierlanguage
- a language identifierassociations
- optional list to receive list of character associationsretainControls
- if true, then retain control characters and their glyph mappings, otherwise remove
public java.lang.CharSequence reorderCombiningMarks(java.lang.CharSequence cs, int[][] gpa, java.lang.String script, java.lang.String language, java.util.List associations)
reorderCombiningMarks
in interface Substitutable
cs
- character sequence within which combining marks to be reorderedgpa
- associated glyph position adjustments (also reordered)script
- a script identifierlanguage
- a language identifierassociations
- optional list of associations to be reordered
protected int[] getUnscaledWidths(GlyphSequence gs)
public boolean performsPositioning()
performsPositioning
in interface Positionable
public int[][] performPositioning(java.lang.CharSequence cs, java.lang.String script, java.lang.String language, int fontSize)
performPositioning
in interface Positionable
cs
- character sequence to map to position offsets (advancement adjustments)script
- a script identifierlanguage
- a language identifierfontSize
- font size
public int[][] performPositioning(java.lang.CharSequence cs, java.lang.String script, java.lang.String language)
performPositioning
in interface Positionable
cs
- character sequence to map to position offsets (advancement adjustments)script
- a script identifierlanguage
- a language identifier
public boolean hasFeature(int tableType, java.lang.String script, java.lang.String language, java.lang.String feature)
Typeface
hasFeature
in interface FontMetrics
hasFeature
in class Typeface
tableType
- type of table (GSUB, GPOS, ...), see GlyphTable.GLYPH_TABLE_TYPE_*script
- to qualify feature lookuplanguage
- to qualify feature lookupfeature
- to test
public java.util.Map<java.lang.Integer,java.lang.Integer> getWidthsMap()
public java.io.InputStream getCmapStream()
|
fop 2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |