Fray Engine
Loading...
Searching...
No Matches
fray::fonts Namespace Reference

Functions

void sortFamilies (std::vector< std::string > &families)
 Sorts family names ignoring case and removes duplicates.
std::vector< std::string > installedFamilies ()
 Lists the font families installed on this computer. Safe to call from any thread; it can take a while, so call it off the message thread. macOS asks CoreText and Windows enumerates through GDI; other platforms return an empty list.

Function Documentation

◆ installedFamilies()

std::vector< std::string > fray::fonts::installedFamilies ( )
inline

Lists the font families installed on this computer. Safe to call from any thread; it can take a while, so call it off the message thread. macOS asks CoreText and Windows enumerates through GDI; other platforms return an empty list.

Returns
Family names sorted without regard to case, without duplicates and without hidden system families.

Definition at line 74 of file system_fonts.hpp.

◆ sortFamilies()

void fray::fonts::sortFamilies ( std::vector< std::string > & families)
inline

Sorts family names ignoring case and removes duplicates.

Parameters
familiesFamily names in any order; changed in place.

Definition at line 25 of file system_fonts.hpp.