Custom Fonts

Using custom fonts in the iOS SDK

The OpenWeb iOS SDK supports custom fonts so you can match the look and feel of your app. There are two supported ways to load custom fonts, depending on how your font files are structured and how much you want iOS to handle style resolution.


Font loading options

You can configure custom fonts using one of the following approaches:


Supported styles

For any configured font family, the SDK attempts to load the following styles. Your font files, filenames, and internal metadata must align with these values:

  • Regular
  • Light
  • Medium
  • Bold
  • SemiBold
  • Italic

If a requested style can't be resolved, the SDK falls back to the default font or a generated variant, depending on the configuration method.


Option 1: Filename-based fonts

Use this option when you want full control over exactly which font file is used for each style.

Requirements

  • Filename pattern
    Each file must follow this exact format: <FamilyName>-<Style>.ttf

  • PostScript name - The font’s internal PostScript Name must exactly match the filename (without the .ttf extension).

  • Missing styles - Any style that's not provided will render using the default font.

Example: Aurora Sans

Required styleFilename (exact)Internal PostScript Name
RegularAurora Sans-Regular.ttfAurora Sans-Regular
BoldAurora Sans-Bold.ttfAurora Sans-Bold
ItalicAurora Sans-Italic.ttfAurora Sans-Italic
LightAurora Sans-Light.ttfAurora Sans-Light

Option 2: Font family–based fonts

Use this option when your font files are correctly configured as a family and you want iOS to handle style selection.

Requirements

  • Internal family name - The font’s internal Family Name must exactly match the fontFamilyName configured in the SDK.

  • Font traits - Each font file must include correct metadata for weight and slant (for example, Bold or Italic) so iOS can resolve styles correctly.

  • Missing styles - If a style isn't available, iOS will generate the closest matching style automatically.


Example

If you configure the SDK with the family name Aurora Sans:

  • The system looks for fonts with the Family Name Aurora Sans.
  • When the SDK requests a bold font, iOS resolves the .bold weight for that family and selects the appropriate file.