Represents a typeface with a specific size.
More...
|
| Font (FontFamily fontFamily, double fontSize) |
| Create a new Font object, given the base typeface and the font size. More...
|
|
| Font (FontFamily fontFamily, double fontSize, bool underlined) |
| Create a new Font object, given the base typeface, the font size, and a boolean value determining whether text using this font should be underlined. More...
|
|
| Font (FontFamily fontFamily, double fontSize, FontUnderline underline) |
| Create a new Font object, given the base typeface, the font size, and an object describing the underline properties of text drawn using this font. More...
|
|
Size | MeasureText (string text) |
| Measure the size of a text string when typeset with this font. More...
|
|
DetailedFontMetrics | MeasureTextAdvanced (string text) |
| Measure all the metrics of a text string when typeset with this font. More...
|
|
|
static bool | EnableKerning = true |
| Determines whether text kerning is enabled. Note that, even when this is set to false , text kerning will be applied on some platforms. For the best consistency, leave this set to true . More...
|
|
|
double | FontSize [get] |
| Font size, in graphics units. More...
|
|
FontFamily | FontFamily [get] |
| Font typeface. More...
|
|
double | Ascent [get] |
| Maximum height over the baseline of the usual glyphs in the font (there may be glyphs taller than this). Always >= 0. More...
|
|
double | WinAscent [get] |
| Height above the baseline for a clipping region (Windows ascent). Always >= 0. More...
|
|
double | Descent [get] |
| Maximum depth below the baseline of the usual glyphs in the font (there may be glyphs deeper than this). Always <= 0. More...
|
|
double | YMax [get] |
| Absolute maximum height over the baseline of the glyphs in the font. Always >= 0. More...
|
|
double | YMin [get] |
| Absolute maximum depth below the baseline of the glyphs in the font. Always <= 0. More...
|
|
FontUnderline | Underline [get] |
| Determines the underline style of text drawn using this font. If this is null , the text is not underlined. More...
|
|
Represents a typeface with a specific size.
Definition at line 27 of file Font.cs.
◆ Font() [1/3]
VectSharp.Font.Font |
( |
FontFamily |
fontFamily, |
|
|
double |
fontSize |
|
) |
| |
Create a new Font object, given the base typeface and the font size.
- Parameters
-
fontFamily | Base typeface. See FontFamily. |
fontSize | The font size, in graphics units. |
Definition at line 164 of file Font.cs.
◆ Font() [2/3]
VectSharp.Font.Font |
( |
FontFamily |
fontFamily, |
|
|
double |
fontSize, |
|
|
bool |
underlined |
|
) |
| |
Create a new Font object, given the base typeface, the font size, and a boolean value determining whether text using this font should be underlined.
- Parameters
-
fontFamily | Base typeface. See FontFamily. |
fontSize | The font size, in graphics units. |
underlined | A boolean value determining whether text drawn using this font should be underlined. The appearance of the underline can be tweaked by changing the properties of the Underline property after the font has been created. |
Definition at line 176 of file Font.cs.
◆ Font() [3/3]
Create a new Font object, given the base typeface, the font size, and an object describing the underline properties of text drawn using this font.
- Parameters
-
fontFamily | Base typeface. See FontFamily. |
fontSize | The font size, in graphics units. |
underline | A FontUnderline object describing the underline properties of text drawn using this font. |
Definition at line 193 of file Font.cs.
◆ MeasureText()
Size VectSharp.Font.MeasureText |
( |
string |
text | ) |
|
Measure the size of a text string when typeset with this font.
- Parameters
-
text | The string to measure. |
- Returns
- A Size object representing the width and height of the text.
Definition at line 300 of file Font.cs.
◆ MeasureTextAdvanced()
Measure all the metrics of a text string when typeset with this font.
- Parameters
-
text | The string to measure. |
- Returns
- A DetailedFontMetrics object representing the metrics of the text.
Definition at line 357 of file Font.cs.
◆ EnableKerning
bool VectSharp.Font.EnableKerning = true |
|
static |
Determines whether text kerning is enabled. Note that, even when this is set to false
, text kerning will be applied on some platforms. For the best consistency, leave this set to true
.
Definition at line 32 of file Font.cs.
◆ Ascent
double VectSharp.Font.Ascent |
|
get |
Maximum height over the baseline of the usual glyphs in the font (there may be glyphs taller than this). Always >= 0.
Definition at line 203 of file Font.cs.
◆ Descent
double VectSharp.Font.Descent |
|
get |
Maximum depth below the baseline of the usual glyphs in the font (there may be glyphs deeper than this). Always <= 0.
Definition at line 239 of file Font.cs.
◆ FontFamily
◆ FontSize
double VectSharp.Font.FontSize |
|
get |
◆ Underline
Determines the underline style of text drawn using this font. If this is null
, the text is not underlined.
Definition at line 293 of file Font.cs.
◆ WinAscent
double VectSharp.Font.WinAscent |
|
get |
Height above the baseline for a clipping region (Windows ascent). Always >= 0.
Definition at line 221 of file Font.cs.
◆ YMax
double VectSharp.Font.YMax |
|
get |
Absolute maximum height over the baseline of the glyphs in the font. Always >= 0.
Definition at line 257 of file Font.cs.
◆ YMin
double VectSharp.Font.YMin |
|
get |
Absolute maximum depth below the baseline of the glyphs in the font. Always <= 0.
Definition at line 275 of file Font.cs.
The documentation for this class was generated from the following file: