Top Description Fields Constructors Methods
org.apache.fontbox.cff

pack-priv Class EmbeddedCharset

extends Object
implements CFFCharset
Class Inheritance
All Implemented Interfaces
org.apache.fontbox.cff.CFFCharset
Known Direct Subclasses
org.apache.fontbox.cff.CFFParser.Format0Charset, org.apache.fontbox.cff.CFFParser.Format1Charset, org.apache.fontbox.cff.CFFParser.Format2Charset

Class representing an embedded CFF charset.

Field Summary

Modifier and TypeField and Description
private final CFFCharset

Constructor Summary

AccessConstructor and Description
pack-priv
EmbeddedCharset(boolean isCIDFont)

Method Summary

Modifier and TypeMethod and Description
public void
addCID(int
GID
gid
,
int
CID
cid
)

Implements org.apache.fontbox.cff.CFFCharset.addCID.

Adds a new GID/CID combination to the charset.

public void
addSID(int
GID
gid
,
int
SID
sid
,
String
the postscript name of the glyph
name
)

Implements org.apache.fontbox.cff.CFFCharset.addSID.

Adds a new GID/SID/name combination to the charset.

public int
getCIDForGID(int
GID
gid
)

Implements org.apache.fontbox.cff.CFFCharset.getCIDForGID.

Returns the CID for the given GID.

public int
getGIDForCID(int
CID
cid
)

Implements org.apache.fontbox.cff.CFFCharset.getGIDForCID.

Returns the GID for a given CID.

public int
getGIDForSID(int
SID
sid
)

Implements org.apache.fontbox.cff.CFFCharset.getGIDForSID.

Returns the GID for the given SID.

public String
getNameForGID(int
GID
gid
)

Implements org.apache.fontbox.cff.CFFCharset.getNameForGID.

Returns the PostScript glyph name for the given GID.

public int
getSID(String
PostScript glyph name
name
)

Implements org.apache.fontbox.cff.CFFCharset.getSID.

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.

public int
getSIDForGID(int
GID
sid
)

Implements org.apache.fontbox.cff.CFFCharset.getSIDForGID.

Returns the SID for a given GID.

public boolean
isCIDFont()

Implements org.apache.fontbox.cff.CFFCharset.isCIDFont.

Indicates if the charset belongs to a CID font.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

charsetback to summary
private final CFFCharset charset

Constructor Detail

EmbeddedCharsetback to summary
pack-priv EmbeddedCharset(boolean isCIDFont)

Method Detail

addCIDback to summary
public void addCID(int gid, int cid)

Implements org.apache.fontbox.cff.CFFCharset.addCID.

Doc from org.apache.fontbox.cff.CFFCharset.addCID.

Adds a new GID/CID combination to the charset.

Parameters
gid:int

GID

cid:int

CID

Annotations
@Override
addSIDback to summary
public void addSID(int gid, int sid, String name)

Implements org.apache.fontbox.cff.CFFCharset.addSID.

Doc from org.apache.fontbox.cff.CFFCharset.addSID.

Adds a new GID/SID/name combination to the charset.

Parameters
gid:int

GID

sid:int

SID

name:String

the postscript name of the glyph

Annotations
@Override
getCIDForGIDback to summary
public int getCIDForGID(int gid)

Implements org.apache.fontbox.cff.CFFCharset.getCIDForGID.

Doc from org.apache.fontbox.cff.CFFCharset.getCIDForGID.

Returns the CID for the given GID.

Parameters
gid:int

GID

Returns:int

CID

Annotations
@Override
getGIDForCIDback to summary
public int getGIDForCID(int cid)

Implements org.apache.fontbox.cff.CFFCharset.getGIDForCID.

Doc from org.apache.fontbox.cff.CFFCharset.getGIDForCID.

Returns the GID for a given CID. Returns 0 if the CID is missing.

Parameters
cid:int

CID

Returns:int

GID

Annotations
@Override
getGIDForSIDback to summary
public int getGIDForSID(int sid)

Implements org.apache.fontbox.cff.CFFCharset.getGIDForSID.

Doc from org.apache.fontbox.cff.CFFCharset.getGIDForSID.

Returns the GID for the given SID. SIDs are internal to the font and are not public.

Parameters
sid:int

SID

Returns:int

GID

Annotations
@Override
getNameForGIDback to summary
public String getNameForGID(int gid)

Implements org.apache.fontbox.cff.CFFCharset.getNameForGID.

Doc from org.apache.fontbox.cff.CFFCharset.getNameForGID.

Returns the PostScript glyph name for the given GID.

Parameters
gid:int

GID

Returns:String

PostScript glyph name

Annotations
@Override
getSIDback to summary
public int getSID(String name)

Implements org.apache.fontbox.cff.CFFCharset.getSID.

Doc from org.apache.fontbox.cff.CFFCharset.getSID.

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:String

PostScript glyph name

Returns:int

SID

Annotations
@Override
getSIDForGIDback to summary
public int getSIDForGID(int sid)

Implements org.apache.fontbox.cff.CFFCharset.getSIDForGID.

Doc from org.apache.fontbox.cff.CFFCharset.getSIDForGID.

Returns the SID for a given GID. SIDs are internal to the font and are not public.

Parameters
sid:int

GID

Returns:int

SID

Annotations
@Override
isCIDFontback to summary
public boolean isCIDFont()

Implements org.apache.fontbox.cff.CFFCharset.isCIDFont.

Doc from org.apache.fontbox.cff.CFFCharset.isCIDFont.

Indicates if the charset belongs to a CID font.

Returns:boolean

true for CID fonts

Annotations
@Override