Package org.apache.fontbox.cff
Interface CFFCharset
-
- All Known Implementing Classes:
CFFCharsetCID,CFFCharsetType1,CFFExpertCharset,CFFExpertSubsetCharset,CFFISOAdobeCharset,CFFParser.EmptyCharsetCID,CFFParser.EmptyCharsetType1,CFFParser.Format0Charset,CFFParser.Format1Charset,CFFParser.Format2Charset,EmbeddedCharset
public interface CFFCharsetA CFF charset. A charset is an array of SIDs/CIDs for all glyphs in the font.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddCID(int gid, int cid)Adds a new GID/CID combination to the charset.voidaddSID(int gid, int sid, java.lang.String name)Adds a new GID/SID/name combination to the charset.intgetCIDForGID(int gid)Returns the CID for the given GID.intgetGIDForCID(int cid)Returns the GID for a given CID.intgetGIDForSID(int sid)Returns the GID for the given SID.java.lang.StringgetNameForGID(int gid)Returns the PostScript glyph name for the given GID.intgetSID(java.lang.String name)Returns the SID for a given PostScript name, you would think this is not needed, but some fonts have glyphs beyond their encoding with charset SID names.intgetSIDForGID(int gid)Returns the SID for a given GID.booleanisCIDFont()Indicates if the charset belongs to a CID font.
-
-
-
Method Detail
-
isCIDFont
boolean isCIDFont()
Indicates if the charset belongs to a CID font.- Returns:
- true for CID fonts
-
addSID
void addSID(int gid, int sid, java.lang.String name)Adds a new GID/SID/name combination to the charset.- Parameters:
gid- GIDsid- SIDname- the postscript name of the glyph
-
addCID
void addCID(int gid, int cid)Adds a new GID/CID combination to the charset.- Parameters:
gid- GIDcid- CID
-
getSIDForGID
int getSIDForGID(int gid)
Returns the SID for a given GID. SIDs are internal to the font and are not public.- Parameters:
gid- GID- Returns:
- SID
-
getGIDForSID
int getGIDForSID(int sid)
Returns the GID for the given SID. SIDs are internal to the font and are not public.- Parameters:
sid- SID- Returns:
- GID
-
getGIDForCID
int getGIDForCID(int cid)
Returns the GID for a given CID. Returns 0 if the CID is missing.- Parameters:
cid- CID- Returns:
- GID
-
getSID
int getSID(java.lang.String name)
Returns the SID for a given PostScript name, you would think this is not needed, but some fonts have glyphs beyond their encoding with charset SID names.- Parameters:
name- PostScript glyph name- Returns:
- SID
-
getNameForGID
java.lang.String getNameForGID(int gid)
Returns the PostScript glyph name for the given GID.- Parameters:
gid- GID- Returns:
- PostScript glyph name
-
getCIDForGID
int getCIDForGID(int gid)
Returns the CID for the given GID.- Parameters:
gid- GID- Returns:
- CID
-
-