Class PdfType0Font
public class PdfType0Font : PdfFont
- Inheritance
-
PdfType0Font
- Inherited Members
Fields
CID_FONT_TYPE_0
CIDFont Type0 (Type1 outlines).
protected const int CID_FONT_TYPE_0 = 0
Field Value
CID_FONT_TYPE_2
CIDFont Type2 (TrueType outlines).
protected const int CID_FONT_TYPE_2 = 2
Field Value
cidFontType
protected int cidFontType
Field Value
cmapEncoding
protected CMapEncoding cmapEncoding
Field Value
specificUnicodeDifferences
protected char[] specificUnicodeDifferences
Field Value
- char[]
usedGlyphs
protected ICollection<int> usedGlyphs
Field Value
vertical
protected bool vertical
Field Value
Methods
AppendAnyGlyph(string, int, IList<Glyph>)
public override int AppendAnyGlyph(string text, int from, IList<Glyph> glyphs)
Parameters
Returns
AppendDecodedCodesToGlyphsList(IList<Glyph>, PdfString)
public override bool AppendDecodedCodesToGlyphsList(IList<Glyph> list, PdfString characterCodes)
Parameters
Returns
AppendGlyphs(string, int, int, IList<Glyph>)
public override int AppendGlyphs(string text, int from, int to, IList<Glyph> glyphs)
Parameters
Returns
ContainsGlyph(int)
public override bool ContainsGlyph(int unicode)
Parameters
unicode
int
Returns
ConvertToBytes(string)
public override byte[] ConvertToBytes(string text)
Parameters
text
string
Returns
- byte[]
ConvertToBytes(Glyph)
public override byte[] ConvertToBytes(Glyph glyph)
Parameters
glyph
Glyph
Returns
- byte[]
ConvertToBytes(GlyphLine)
public override byte[] ConvertToBytes(GlyphLine glyphLine)
Parameters
glyphLine
GlyphLine
Returns
- byte[]
CreateGlyphLine(string)
public override GlyphLine CreateGlyphLine(string content)
Parameters
content
string
Returns
Decode(PdfString)
public override string Decode(PdfString content)
Parameters
content
PdfString
Returns
DecodeIntoGlyphLine(PdfString)
public override GlyphLine DecodeIntoGlyphLine(PdfString characterCodes)
Parameters
characterCodes
PdfString
Returns
Flush()
public override void Flush()
GetCidFont(PdfDictionary, string, bool)
Generates the CIDFontType2 dictionary.
protected virtual PdfDictionary GetCidFont(PdfDictionary fontDescriptor, string fontName, bool isType2)
Parameters
fontDescriptor
PdfDictionarythe font descriptor dictionary
fontName
stringa name of the font
isType2
booltrue, if the font is CIDFontType2 (TrueType glyphs), otherwise false, i.e. CIDFontType0 (Type1/CFF glyphs)
Returns
- PdfDictionary
fully initialized CIDFont
GetCmap()
Gets CMAP associated with the Pdf Font.
public virtual CMapEncoding GetCmap()
Returns
- CMapEncoding
CMAP
- See Also
GetContentWidth(PdfString)
public override float GetContentWidth(PdfString content)
Parameters
content
PdfString
Returns
GetFontDescriptor(string)
protected override PdfDictionary GetFontDescriptor(string fontName)
Parameters
fontName
string
Returns
GetGlyph(int)
public override Glyph GetGlyph(int unicode)
Parameters
unicode
int
Returns
GetToUnicode()
Creates a ToUnicode CMap to allow copy and paste from Acrobat.
public virtual PdfStream GetToUnicode()
Returns
- PdfStream
the stream representing this CMap or
null
GetUniMapFromOrdering(string, bool)
Get Unicode mapping name from ordering.
public static string GetUniMapFromOrdering(string ordering, bool horizontal)
Parameters
ordering
stringthe text ordering to base to unicode mapping on
horizontal
boolidentifies whether the encoding is horizontal or vertical
Returns
- string
Unicode mapping name
IsBuiltWith(string, string)
public override bool IsBuiltWith(string fontProgram, string encoding)
Parameters
Returns
WriteText(string, PdfOutputStream)
public override void WriteText(string text, PdfOutputStream stream)
Parameters
text
stringstream
PdfOutputStream
WriteText(GlyphLine, int, int, PdfOutputStream)
public override void WriteText(GlyphLine text, int from, int to, PdfOutputStream stream)
Parameters
text
GlyphLinefrom
intto
intstream
PdfOutputStream