Class TrueTypeFontSubSet
Inheritance
TrueTypeFontSubSet
Assembly: Reportman.Drawing.dll
Syntax
public class TrueTypeFontSubSet
Constructors
TrueTypeFontSubSet(string, byte[], Dictionary<int, int[]>, uint)
Create a class to extact the subset stream of a font, given the glyphs used
Declaration
public TrueTypeFontSubSet(string fontname, byte[] rfarray, Dictionary<int, int[]> glyphsUsed, uint directoryOffset)
Parameters
Fields
directoryOffset
Declaration
protected uint directoryOffset
Field Value
fontPtr
Declaration
Field Value
glyfTableRealSize
Declaration
protected int glyfTableRealSize
Field Value
glyphsInList
Declaration
protected List<int> glyphsInList
Field Value
glyphsUsed
Declaration
protected Dictionary<int, int[]> glyphsUsed
Field Value
locaShortTable
Declaration
protected bool locaShortTable
Field Value
locaTable
Declaration
protected int[] locaTable
Field Value
locaTableRealSize
Declaration
protected int locaTableRealSize
Field Value
newGlyfTable
Declaration
protected byte[] newGlyfTable
Field Value
newLocaTable
Declaration
protected int[] newLocaTable
Field Value
newLocaTableOut
Declaration
protected byte[] newLocaTableOut
Field Value
outFont
Declaration
Field Value
rfarray
Declaration
Field Value
tableGlyphOffset
Declaration
protected int tableGlyphOffset
Field Value
tables
Declaration
protected SortedList<string, TableData> tables
Field Value
Methods
AssembleFont()
Declaration
protected void AssembleFont()
ByteArrayToInt(byte[], int, int)
Declaration
public static int ByteArrayToInt(byte[] b1, int index, int alen)
Parameters
| Type |
Name |
Description |
| byte[] |
b1 |
|
| int |
index |
|
| int |
alen |
|
Returns
ByteArrayToShort(byte[], int, int)
Declaration
public static short ByteArrayToShort(byte[] b1, int index, int alen)
Parameters
| Type |
Name |
Description |
| byte[] |
b1 |
|
| int |
index |
|
| int |
alen |
|
Returns
ByteArrayToUInt(byte[], int, int)
Converts a byte array to an uint value
Declaration
public static uint ByteArrayToUInt(byte[] b1, int index, int alen)
Parameters
| Type |
Name |
Description |
| byte[] |
b1 |
|
| int |
index |
|
| int |
alen |
|
Returns
ByteArrayToUShort(byte[], int, int)
Declaration
public static ushort ByteArrayToUShort(byte[] b1, int index, int alen)
Parameters
| Type |
Name |
Description |
| byte[] |
b1 |
|
| int |
index |
|
| int |
alen |
|
Returns
CalculateChecksum(byte[])
Declaration
protected int CalculateChecksum(byte[] b)
Parameters
| Type |
Name |
Description |
| byte[] |
b |
|
Returns
CheckGlyphComposite(int)
Declaration
protected void CheckGlyphComposite(int glyph)
Parameters
| Type |
Name |
Description |
| int |
glyph |
|
CreateNewGlyphTables()
Declaration
protected void CreateNewGlyphTables()
CreateTableDirectory()
Declaration
protected void CreateTableDirectory()
Execute()
Declaration
Returns
FlatGlyphs()
Declaration
protected void FlatGlyphs()
GetPostcriptName(int)
Declaration
public string GetPostcriptName(int offset)
Parameters
| Type |
Name |
Description |
| int |
offset |
|
Returns
LocaTobytes()
Declaration
protected void LocaTobytes()
ReadBytes(int, byte[], int, int)
Declaration
public void ReadBytes(int nindex, byte[] b, int off, int len)
Parameters
ReadLoca()
Declaration
protected void ReadLoca()
WriteFontInt(int)
Declaration
protected void WriteFontInt(int n)
Parameters
| Type |
Name |
Description |
| int |
n |
|
WriteFontShort(int)
Declaration
protected void WriteFontShort(int n)
Parameters
| Type |
Name |
Description |
| int |
n |
|
WriteFontString(string)
Declaration
protected void WriteFontString(string s)
Parameters
| Type |
Name |
Description |
| string |
s |
|