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 29 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 166 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 178 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 195 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 302 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 359 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 34 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 205 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 241 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 295 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 223 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 259 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 277 of file Font.cs.
The documentation for this class was generated from the following file: