<div class="meta" robots="noindex">

</div>

Class

# iOSFont

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Font</api/graphics/font>` as a replacement.

</div>

## Description

Provides access to fonts on iOS.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                             | Type                             | Read-Only | Shared |
|----------------------------------|----------------------------------|-----------|--------|
| `Ascent<iosfont.ascent>`         | `Double</api/data_types/double>` | ✓         |        |
| `CapHeight<iosfont.capheight>`   | `Double</api/data_types/double>` | ✓         |        |
| `Descent<iosfont.descent>`       | `Double</api/data_types/double>` | ✓         |        |
| `Leading<iosfont.leading>`       | `Double</api/data_types/double>` | ✓         |        |
| `LineHeight<iosfont.lineheight>` | `Double</api/data_types/double>` | ✓         |        |
| `Name<iosfont.name>`             | `Text</api/deprecated/text>`     | ✓         |        |
| `Size<iosfont.size>`             | `Double</api/data_types/double>` | ✓         |        |
| `XHeight<iosfont.xheight>`       | `Double</api/data_types/double>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                               | Parameters                                                                                        | Returns                          | Shared |
|----------------------------------------------------|---------------------------------------------------------------------------------------------------|----------------------------------|--------|
| `BoldSystemFont<iosfont.boldsystemfont>`           | size As `Double</api/data_types/double>` = 0                                                      | iOSFont                          | ✓      |
| `Constructor<iosfont.constructor0>`                | postscriptName As `String</api/data_types/string>`, pointSize As `Double</api/data_types/double>` |                                  |        |
| `ItalicSystemFont<iosfont.italicsystemfont>`       | size As `Double</api/data_types/double>` = 0                                                      | iOSFont                          | ✓      |
| `SmallSystemFontSize<iosfont.smallsystemfontsize>` |                                                                                                   | `Double</api/data_types/double>` | ✓      |
| `SystemFont<iosfont.systemfont>`                   | size As `Double</api/data_types/double>` = 0                                                      | iOSFont                          | ✓      |
| `SystemFontSize<iosfont.systemfontsize>`           |                                                                                                   | `Double</api/data_types/double>` | ✓      |

## Property descriptions

<div id="iosfont.ascent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.Ascent

**Ascent** As `Double</api/data_types/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.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontAscent As Double = f.Ascent
```

<div id="iosfont.capheight">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.CapHeight

**CapHeight** As `Double</api/data_types/double>`

The height of a capital letter above the baseline for the font.

This property is read-only.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontCapHeight As Double = f.CapHeight
```

<div id="iosfont.descent">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.Descent

**Descent** As `Double</api/data_types/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.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontDescent As Double = f.Descent
```

<div id="iosfont.leading">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.Leading

**Leading** As `Double</api/data_types/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.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontLeading As Double = f.Leading
```

<div id="iosfont.lineheight">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.LineHeight

**LineHeight** As `Double</api/data_types/double>`

The line height for the font.

This property is read-only.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontLineHeight As Double = f.LineHeight
```

<div id="iosfont.name">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.Name

**Name** As `Text</api/deprecated/text>`

The name of the font.

This property is read-only.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontName As Text = f.Name
```

<div id="iosfont.size">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.Size

**Size** As `Double</api/data_types/double>`

The point size of the font.

This property is read-only.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontSize As Double = f.Size
```

<div id="iosfont.xheight">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.XHeight

**XHeight** As `Double</api/data_types/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.

``` xojo
Var f As iOSFont = iOSFont.SystemFont(20) ' 20-point
Var fontXHeight As Double = f.XHeight
```

## Method descriptions

<div id="iosfont.boldsystemfont">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.BoldSystemFont

**BoldSystemFont**(size As `Double</api/data_types/double>` = 0) As iOSFont

Gets the bold system font at the specified size.

This method is `shared</api/language/shared>`.

``` xojo
Label1.TextFont = iOSFont.BoldSystemFont
```

<div id="iosfont.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.Constructor

**Constructor**(postscriptName As `String</api/data_types/string>`, pointSize As `Double</api/data_types/double>`)

<div class="note">

<div class="title">

Note

</div>

`Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.

</div>

Creates an <span class="title-ref">iOSFont</span> 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:

``` xojo
Var courier As New iOSFont("Courier", 18)
Button1.TextFont = courier
```

<div id="iosfont.italicsystemfont">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.ItalicSystemFont

**ItalicSystemFont**(size As `Double</api/data_types/double>` = 0) As iOSFont

Gets the italic system font at the specified point size.

This method is `shared</api/language/shared>`.

Sets a Label to use a large system italic font:

``` xojo
Label1.TextFont = iOSFont.ItalicSystemFont(48)
```

<div id="iosfont.smallsystemfontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.SmallSystemFontSize

**SmallSystemFontSize** As `Double</api/data_types/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</api/language/shared>`.

``` xojo
Label1.TextFont = iOSFont.SystemFont(iOSFont.SmallSystemFontSize)
```

<div id="iosfont.systemfont">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.SystemFont

**SystemFont**(size As `Double</api/data_types/double>` = 0) As iOSFont

Gets the system font.

This method is `shared</api/language/shared>`.

``` xojo
Label1.TextFont = iOSFont.SystemFont(48)
```

<div id="iosfont.systemfontsize">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

iOSFont.SystemFontSize

**SystemFontSize** As `Double</api/data_types/double>`

Gets the system font size.

This method is `shared</api/language/shared>`.

``` xojo
Label1.TextFont = iOSFont.ItalicSystemFont(iOSFont.SystemFontSize)
```

## Notes

Notes You can find a list of fonts available on iOS devices at [iOSFonts.com](http://iosfonts.com/).

## Compatibility

iOS projects on the iOS operating system.

## See also

`Object</api/data_types/additional_types/object>` parent class; `MobileButton</api/user_interface/mobile/mobilebutton>`, `MobileTextField</api/user_interface/mobile/mobiletextfield>`, `MobileTextArea</api/user_interface/mobile/mobiletextarea>` controls; `iOSGraphics</api/deprecated/iosgraphics>` class
