Table of Contents

Class PdfType0Font

Namespace
iText.Kernel.Font
Assembly
itext.kernel.dll
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

int

CID_FONT_TYPE_2

CIDFont Type2 (TrueType outlines).

protected const int CID_FONT_TYPE_2 = 2

Field Value

int

cidFontType

protected int cidFontType

Field Value

int

cmapEncoding

protected CMapEncoding cmapEncoding

Field Value

CMapEncoding

specificUnicodeDifferences

protected char[] specificUnicodeDifferences

Field Value

char[]

usedGlyphs

protected ICollection<int> usedGlyphs

Field Value

ICollection<int>

vertical

protected bool vertical

Field Value

bool

Methods

AppendAnyGlyph(string, int, IList<Glyph>)

public override int AppendAnyGlyph(string text, int from, IList<Glyph> glyphs)

Parameters

text string
from int
glyphs IList<Glyph>

Returns

int

AppendDecodedCodesToGlyphsList(IList<Glyph>, PdfString)

public override bool AppendDecodedCodesToGlyphsList(IList<Glyph> list, PdfString characterCodes)

Parameters

list IList<Glyph>
characterCodes PdfString

Returns

bool

AppendGlyphs(string, int, int, IList<Glyph>)

public override int AppendGlyphs(string text, int from, int to, IList<Glyph> glyphs)

Parameters

text string
from int
to int
glyphs IList<Glyph>

Returns

int

ContainsGlyph(int)

public override bool ContainsGlyph(int unicode)

Parameters

unicode int

Returns

bool

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

GlyphLine

Decode(PdfString)

public override string Decode(PdfString content)

Parameters

content PdfString

Returns

string

DecodeIntoGlyphLine(PdfString)

public override GlyphLine DecodeIntoGlyphLine(PdfString characterCodes)

Parameters

characterCodes PdfString

Returns

GlyphLine

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 PdfDictionary

the font descriptor dictionary

fontName string

a name of the font

isType2 bool

true, 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

float

GetFontDescriptor(string)

protected override PdfDictionary GetFontDescriptor(string fontName)

Parameters

fontName string

Returns

PdfDictionary

GetGlyph(int)

public override Glyph GetGlyph(int unicode)

Parameters

unicode int

Returns

Glyph

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 string

the text ordering to base to unicode mapping on

horizontal bool

identifies whether the encoding is horizontal or vertical

Returns

string

Unicode mapping name

IsBuiltWith(string, string)

public override bool IsBuiltWith(string fontProgram, string encoding)

Parameters

fontProgram string
encoding string

Returns

bool

WriteText(string, PdfOutputStream)

public override void WriteText(string text, PdfOutputStream stream)

Parameters

text string
stream PdfOutputStream

WriteText(GlyphLine, int, int, PdfOutputStream)

public override void WriteText(GlyphLine text, int from, int to, PdfOutputStream stream)

Parameters

text GlyphLine
from int
to int
stream PdfOutputStream