05-28-2023, 04:36 AM
Nice work bplus.
I created my program more along a question by PhilofPerth in your thread:
https://staging.qb64phoenix.com/showthre...6#pid16106
I guess a list of filenames could be acquired. However for my program it will require a "fancy" name which is what the topic is about. For the large number of TTF fonts, the fancy name could be surmised out of the filename.
Note that "Bold" is usually indicated by two letters, not one like with "Italic". A few fonts have "z" instead of "bi", and sport other styles like "Condensed", and "Italic" could be called "Oblique" instead. I discovered an "Arial Black" which name is "ariblk.ttf".
Font names for Linux are different, and the way they are organized. A "family" has its own directory such as "Liberation" and "Noto", and the font name and style is usually clearly spelled out.
Admittedly, my program was meant to work as simply as possible, and the user could choose whatever name he/she wanted such as "Best" instead of "Times New Roman" to point to "C:\Windows\Fonts\times.ttf". But there's no provision for the point size, although once pasted into the source code it could be quickly changed.
I created my program more along a question by PhilofPerth in your thread:
https://staging.qb64phoenix.com/showthre...6#pid16106
I guess a list of filenames could be acquired. However for my program it will require a "fancy" name which is what the topic is about. For the large number of TTF fonts, the fancy name could be surmised out of the filename.
Code: (Select All)
cour.ttf -- REGULAR Courier.
couri.ttf -- ITALIC Courier.
^
courbd.txt -- BOLD Courier.
^^
courbi.ttf -- BOLD ITALIC Courier.
^^
Note that "Bold" is usually indicated by two letters, not one like with "Italic". A few fonts have "z" instead of "bi", and sport other styles like "Condensed", and "Italic" could be called "Oblique" instead. I discovered an "Arial Black" which name is "ariblk.ttf".
Font names for Linux are different, and the way they are organized. A "family" has its own directory such as "Liberation" and "Noto", and the font name and style is usually clearly spelled out.
Admittedly, my program was meant to work as simply as possible, and the user could choose whatever name he/she wanted such as "Best" instead of "Times New Roman" to point to "C:\Windows\Fonts\times.ttf". But there's no provision for the point size, although once pasted into the source code it could be quickly changed.