there is some of my ideas:
add bold and italic as variables to Font and maybe also underscore, strikethrough and
possible other font attributes.
And let the FontManager map name & fontFlags => real font path
to register some font i thought about something like this
Code: Select all
void setFontPath(const String& name, const String& filename, FontFlag flags)
const String& getFontPath(const String& name, FontFlag flags)
but remove the get font from name function from manager because fonts doent have a uniq name any more
(or make it that "abc_12i" is casted to font with registerd name abc, in font size 12 and italic)
PS: maybe remove native_horz_res from Font and try to check it dynamicly from System
currently it does not change many of the API you can still create a font with FontManager.createFreeTypeFont
it only get new create method
Code: Select all
FontManager.create(const String& name,const float size, FontFlag flags, const bool anti_aliased,const bool auto_scaled = false)
for Caching all the font sizes of a specific font, all Font* of the same font, shares a Font_impl* object that hold the cache.
maybe in from of a smart_ptr or that the Font* says to its Font_impl* that is going to be deleted.