Page 1 of 1

More fontattributes to get

Posted: Sun Jul 29, 2018 7:39 pm
by lazi
There is some constants for the table created by GetAvailableFonts() to describe font styles stored in the font files.

Weight: The weight of this font. This will be set to one of the
following weight constants:

#FONTWEIGHT_THIN
#FONTWEIGHT_EXTRALIGHT
#FONTWEIGHT_ULTRALIGHT
#FONTWEIGHT_LIGHT
#FONTWEIGHT_BOOK
#FONTWEIGHT_NORMAL
#FONTWEIGHT_REGULAR
#FONTWEIGHT_MEDIUM
#FONTWEIGHT_SEMIBOLD
#FONTWEIGHT_DEMIBOLD
#FONTWEIGHT_BOLD
#FONTWEIGHT_EXTRABOLD
#FONTWEIGHT_ULTRABOLD
#FONTWEIGHT_HEAVY
#FONTWEIGHT_BLACK
#FONTWEIGHT_EXTRABLACK
#FONTWEIGHT_ULTRABLACK

Slant: The slant style of this font. This will be set to one of the
following slant constants:

#FONTSLANT_ROMAN
#FONTSLANT_ITALIC
#FONTSLANT_OBLIQUE


It would be handy if these attributes can be obtained by GetAttribute with #font for already opened fonts.

Re: More fontattributes to get

Posted: Tue Jul 31, 2018 10:59 pm
by airsoftsoftwair
Should be possible. Request noted.

Re: More fontattributes to get

Posted: Thu Dec 06, 2018 4:58 pm
by airsoftsoftwair
Sorry, turns out that this cannot be easily implemented. GetAvailableFonts() uses a custom TTF parser to obtain the information from the installed fonts whereas OpenFont() uses wholly different code of various font engine APIs to load fonts so you'll have to live with the information GetAvailableFonts() returns to you.