Class
iOSFont
Warning
This item was deprecated in version 2020r2. Please use Font as a replacement.
Description
Provides access to fonts on iOS.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
size As Double = 0 |
iOSFont |
✓ |
|
size As Double = 0 |
iOSFont |
✓ |
|
✓ |
|||
size As Double = 0 |
iOSFont |
✓ |
|
✓ |
Property descriptions
iOSFont.Ascent
Ascent As Double
The ascent of the font. The ascent of a font is the distance from the tops of the tallest glyphs to the baseline.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontAscent As Double = f.Ascent
iOSFont.CapHeight
CapHeight As Double
The height of a capital letter above the baseline for the font.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontCapHeight As Double = f.CapHeight
iOSFont.Descent
Descent As Double
The descent of the font. The descent of a font is the distance from the baseline to the bottom of the lowest descenders on the glyphs.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontDescent As Double = f.Descent
iOSFont.Leading
Leading As Double
The leading for the font. The leading is the recommended vertical distance from the bottom of the descenders to the top of the next line in a multiline setting.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontLeading As Double = f.Leading
iOSFont.LineHeight
LineHeight As Double
The line height for the font.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontLineHeight As Double = f.LineHeight
iOSFont.Name
Name As Text
The name of the font.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontName As Text = f.Name
iOSFont.Size
Size As Double
The point size of the font.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontSize As Double = f.Size
iOSFont.XHeight
XHeight As Double
The distance between the baseline and the mean line for the font. Typically, this is the height of the letter x in the font.
This property is read-only.
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontXHeight As Double = f.XHeight
Method descriptions
iOSFont.BoldSystemFont
BoldSystemFont(size As Double = 0) As iOSFont
Gets the bold system font at the specified size.
This method is shared.
Label1.TextFont = iOSFont.BoldSystemFont
iOSFont.Constructor
Constructor(postscriptName As String, pointSize As Double)
Note
Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.
Creates an iOSFont from the postscriptName.
iOS adds a few additional fonts: * KhmerSangamMN * DamascusLight * LaoSangamMN * AppleSDGothicNeo-UltraLight * KohinoorDevanagari-Light * KohinoorDevanagari-Medium * KohinoorDevanagari-Book
Sets a button text to use Courier:
Var courier As New iOSFont("Courier", 18)
Button1.TextFont = courier
iOSFont.ItalicSystemFont
ItalicSystemFont(size As Double = 0) As iOSFont
Gets the italic system font at the specified point size.
This method is shared.
Sets a Label to use a large system italic font:
Label1.TextFont = iOSFont.ItalicSystemFont(48)
iOSFont.SmallSystemFontSize
SmallSystemFontSize As Double
Gets the small system font point size. Use this to provide the size parameter to BoldSystemFont, ItalicSystemFont and SystemFont to get those fonts in the small size.
This method is shared.
Label1.TextFont = iOSFont.SystemFont(iOSFont.SmallSystemFontSize)
iOSFont.SystemFont
SystemFont(size As Double = 0) As iOSFont
Gets the system font.
This method is shared.
Label1.TextFont = iOSFont.SystemFont(48)
iOSFont.SystemFontSize
SystemFontSize As Double
Gets the system font size.
This method is shared.
Label1.TextFont = iOSFont.ItalicSystemFont(iOSFont.SystemFontSize)
Notes
Notes You can find a list of fonts available on iOS devices at iOSFonts.com.
Compatibility
iOS projects on the iOS operating system.
See also
Object parent class; MobileButton, MobileTextField, MobileTextArea controls; iOSGraphics class