ID:133685
 
This is a revival of my request from [link]. Especially with the new interface system, it would be nice if game designers were more capable of controlling the fonts used in the various interface elements. Most of my favorite fonts must be downloaded before they're available to one's system, which means that using something flashy might get picked up by a small margin of users, and the others are left to gaze at..what, Georgia? Arial? Setting fall-back fonts is a decent counter-measure in design, but sometimes there just isn't a decent enough alternative.

I'm not sure what the semantics are for caching fonts that are not installed in one's system for rendering, but if that method proves not feasible, then perhaps fonts could be packaged with a game's resources, and clients might be prompted as in the "a new skin is available," except for something along the lines of "A font is available with this skin that is not installed on your system. Install this font?" This would give game designers the feeling of security that users will be able to easily view their skin as intended (no tracking down ancient fonts) if they want to, and those that wish to do without can suffer the boredom of Times New Roman or some other standard font.

Hiead
The fallabck method is probably the best you're gonna get, I'm afraid. Windows makes it nigh impossible to render text in an uninstalled font, and about as hard to install fonts on the fly. I believe programs that do so manage to do it by basically handling all the rendering foo themselves after reading the raw file.

Lummox JR
In response to Lummox JR
Lummox JR wrote:
Windows makes it nigh impossible to render text in an uninstalled font

Really? I haven't tested the functionality of this method, but the Win32 API contains the functions AddFontResource() and AddFontResourceEx() which seem to provide this functionality nicely, especially the latter of the two.

Edit: to elaborate on how I envision this to work, fonts could either be packaged with games or placed into the RSC (whichever is favorable), and then loaded via the above functions into the system font table (using a font stored in the RSC would probably involve extracting the font file into the cache folder).

and about as hard to install fonts on the fly.

I can imagine that this would at least be a valid claim, with the permissions disaster that Windows is built on (and which seems to worsen with each new version).

Hiead
In response to Hiead
Hiead wrote:
Lummox JR wrote:
Windows makes it nigh impossible to render text in an uninstalled font

Really? I haven't tested the functionality of this method, but the Win32 API contains the functions AddFontResource() and AddFontResourceEx() which seem to provide this functionality nicely, especially the latter of the two.

Well dang. That's been there the whole time?

The latter doesn't seem like it'd be usable for us due to the compiler setup we have, but the former seems doable.

Lummox JR