VectSharp 2.6.1
A light library for C# vector graphics
|
Represents a typeface. More...
Public Types | |
enum | StandardFontFamilies |
The 14 standard font families. More... | |
Public Member Functions | |
FontFamily (string fileName) | |
Create a new FontFamily. More... | |
FontFamily (Stream ttfStream) | |
Create a new FontFamily. More... | |
FontFamily (TrueTypeFile ttf) | |
Create a new FontFamily. More... | |
FontFamily (StandardFontFamilies standardFontFamily) | |
Create a new standard FontFamily. More... | |
Static Public Member Functions | |
static FontFamily | ResolveFontFamily (string fontFamily) |
Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, an exception might be raised. Equivalent to DefaultFontLibrary.ResolveFontFamily. More... | |
static FontFamily | ResolveFontFamily (StandardFontFamilies standardFontFamily) |
Create a new font family from the specified standard font family name. Equivalent to DefaultFontLibrary.ResolveFontFamily. More... | |
static FontFamily | ResolveFontFamily (string fontFamily, params string[] fallback) |
Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, an exception might be raised. Equivalent to DefaultFontLibrary.ResolveFontFamily. More... | |
static FontFamily | ResolveFontFamily (string fontFamily, StandardFontFamilies finalFallback, params string[] fallback) |
Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, instantiate a standard font family using the finalFallback . Equivalent to DefaultFontLibrary.ResolveFontFamily. More... | |
Static Public Attributes | |
static string[] | StandardFamilies = new string[] { "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique", "Symbol", "ZapfDingbats" } |
The names of the 14 standard families that are guaranteed to be displayed correctly. More... | |
static string[] | StandardFontFamilyResources |
The names of the resource streams pointing to the included TrueType font files for each of the standard 14 font families. More... | |
Properties | |
static IFontLibrary | DefaultFontLibrary = new DefaultFontLibrary() [get, set] |
The default font library used to resolve font family names. More... | |
bool | IsStandardFamily [get] |
Whether this is one of the 14 standard font families or not. More... | |
string | FileName [get] |
Full path to the TrueType font file for this font family (or, if this is a standard font family, name of the font family). More... | |
string | FamilyName [get] |
Name of the font family, including any variantes. More... | |
TrueTypeFile | TrueTypeFile [get] |
Parsed TrueType font file for this font family. See also:
. More... | |
bool | IsBold [get] |
Whether this font is bold or not. This is set based on the information included in the OS/2 table of the TrueType file. More... | |
bool | IsItalic [get] |
Whether this font is italic or oblique or not. This is set based on the information included in the OS/2 table of the TrueType file. More... | |
bool | IsOblique [get] |
Whether this font is oblique or not. This is set based on the information included in the OS/2 table of the TrueType file. More... | |
VectSharp.FontFamily.FontFamily | ( | string | fileName | ) |
Create a new FontFamily.
fileName | The full path to the TrueType font file for this font family or the name of a standard font family. |
VectSharp.FontFamily.FontFamily | ( | Stream | ttfStream | ) |
Create a new FontFamily.
ttfStream | A stream containing a file in TTF format. |
VectSharp.FontFamily.FontFamily | ( | TrueTypeFile | ttf | ) |
Create a new FontFamily.
ttf | A font file in TTF format. |
VectSharp.FontFamily.FontFamily | ( | StandardFontFamilies | standardFontFamily | ) |
Create a new standard FontFamily.
standardFontFamily | The standard font family. |
|
static |
Create a new font family from the specified standard font family name. Equivalent to DefaultFontLibrary.ResolveFontFamily.
standardFontFamily | The standard name of the font family. |
|
static |
Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, an exception might be raised. Equivalent to DefaultFontLibrary.ResolveFontFamily.
fontFamily | The name of the font family to create, or the path to a TTF file. |
|
static |
Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, an exception might be raised. Equivalent to DefaultFontLibrary.ResolveFontFamily.
fontFamily | The name of the font family to create, or the path to a TTF file. |
fallback | Names of additional font families or TTF files, which will be tried if the first fontFamily is not valid. |
|
static |
Create a new font family from the specified family name or true type file. If the family name or the true type file are not valid, try to instantiate the font family using the fallback . If none of the fallback family names or true type files are valid, instantiate a standard font family using the finalFallback . Equivalent to DefaultFontLibrary.ResolveFontFamily.
fontFamily | The name of the font family to create, or the path to a TTF file. |
fallback | Names of additional font families or TTF files, which will be tried if the first fontFamily is not valid. |
finalFallback | The standard name of the font family that will be used if none of the fallback families are valid. |
|
static |
|
static |
The names of the resource streams pointing to the included TrueType font files for each of the standard 14 font families.
|
staticgetset |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |