01-13-2025, 02:12 PM
Windows lets you install fonts still, but it's not necessary.
All one has to do is include the font in the same directory as the source code (or the qb64pe folder, if you're not saving it to some personalized folder), and then reference it without any paths whatsoever.
font = _LoadFont(fontname$, size, property$)
For example:
font = _LoadFont("courbd.ttf", 20, "monospace")
NOTE: On Windows, this style format will resolve itself in two steps:
1) It checks the _CWD$ (current working directory) path for the file.
2) It checks "CWindows\Fonts\" as the path, in case the first fails and doesn't find the file.
You shouldn't need to hardcode paths in Windows unless you've just deliberately placed your font files into a resource folder somewhere relative to your BAS file.
All one has to do is include the font in the same directory as the source code (or the qb64pe folder, if you're not saving it to some personalized folder), and then reference it without any paths whatsoever.
font = _LoadFont(fontname$, size, property$)
For example:
font = _LoadFont("courbd.ttf", 20, "monospace")
NOTE: On Windows, this style format will resolve itself in two steps:
1) It checks the _CWD$ (current working directory) path for the file.
2) It checks "CWindows\Fonts\" as the path, in case the first fails and doesn't find the file.
You shouldn't need to hardcode paths in Windows unless you've just deliberately placed your font files into a resource folder somewhere relative to your BAS file.