|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::optional< std::string > MayaFlux::Portal::Text::find_font | ( | std::string_view | family, |
| std::string_view | style = {} |
||
| ) |
Locate a system font file by family name and optional style.
Queries the platform font subsystem without requiring any bundled assets. On Linux: links against fontconfig and calls FcFontMatch. On macOS: shells out to fc-match if fontconfig is available, otherwise walks ~/Library/Fonts and /System/Library/Fonts. On Windows: walks WINDIR%\Fonts for a filename containing family.
The result is an absolute path suitable for passing directly to Portal::Text::set_default_font() or FontFace::load().
| family | Font family name, e.g. "JetBrains Mono", "DejaVu Sans". |
| style | Optional style hint, e.g. "Medium", "Bold", "Italic". Passed to fontconfig on Linux; ignored on other platforms. |
Referenced by set_default_font().
Here is the caller graph for this function: