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.
More fontattributes to get
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: More fontattributes to get
Should be possible. Request noted.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: More fontattributes to get
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.