More fontattributes to get

Feature requests for future versions of Hollywood can be voiced here
Post Reply
User avatar
lazi
Posts: 549
Joined: Thu Feb 24, 2011 11:08 pm

More fontattributes to get

Post 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.

User avatar
airsoftsoftwair
Posts: 4209
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More fontattributes to get

Post by airsoftsoftwair »

Should be possible. Request noted.

User avatar
airsoftsoftwair
Posts: 4209
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: More fontattributes to get

Post 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.

Post Reply