Functions
Font API

Font utilities. More...

Functions

AI_API const AtArray * AiFontGetFamilies ()
 Return available font families. More...
 
AI_API const AtArray * AiFontGetStyles (const AtString family)
 Return available font styles of a given font family. More...
 
AI_API AtString AiFontGetFilename (const AtString family, const AtString style)
 Filename of a given font family and style. More...
 

Detailed Description

Font utilities.

Function Documentation

◆ AiFontGetFamilies()

AI_API const AtArray * AiFontGetFamilies ( )

Return available font families.

Fonts are loaded from the following places:

  • any directories named in the OPENIMAGEIO_FONTS environment variable
  • system font directories (e.g. /Library/Fonts, /System/Library/Fonts, C:\Windows\Fonts)
  • user font directories (e.g. /usr/fonts, /usr/share/fonts, LOCALAPPDATA%\Microsoft\Windows\Fonts)
Returns
list of available font families

◆ AiFontGetStyles()

AI_API const AtArray * AiFontGetStyles ( const AtString  family)

Return available font styles of a given font family.

Parameters
familyfont family name (e.g. Arial)
Returns
list of available font styles

◆ AiFontGetFilename()

AI_API AtString AiFontGetFilename ( const AtString  family,
const AtString  style 
)

Filename of a given font family and style.

This function returns the filename of a given font family name and style. For instance the filename of the "Courier New Italic" font is "couri.ttf". If style is an empty string, it returns the regular style font, if exists.

Parameters
familyfont family name (e.g. Arial)
stylefont style (e.g. Regular, Italic, etc.)
Returns
font filename

© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com