Archived

This topic is now archived and is closed to further replies.

Font availability

This topic is 5653 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When using fonts in D3D (with the LOGFONT structure) does the font i am using (e.g. arial, times new roman, chiller, etc) need to be present on the end users system, or will it be included somehow in the .exe? Currently I am restricting myself to standard fonts because I believe it won''t be. Is it true? And if so could anyone point me towards a tutorial for getting around it, i.e. how to package fonts in the executable. Cheers, pan narrans P.S. Having to chop up and blit a bitmap full of text doesn''t sound like fun!

Share this post


Link to post
Share on other sites
quote:
Original post by pan narrans
does the font i am using need to be present on the end users system, or will it be included somehow in the .exe?



It has to be on the users system. The way around this is to package the font with your program (You could have it stored in the exe, but that complicates things), then in your startup code you register the font, then unregister it during shutdown. I''ll look for some tutorials this afternoon.

Share this post


Link to post
Share on other sites
I''m unsure as to how you go about registering/unregistering fonts but would that require that the font was installed to the users C:\Windows\Fonts directory first?

I''ve been browsing Google, but so far, no luck!

Share this post


Link to post
Share on other sites
AddFontResource()
RemoveFontResource()

These two functions add and remove (respectively) a font from the system''s font table so that it can be used for font output.



I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm

Share this post


Link to post
Share on other sites
Be aware that there''s a legal dilemma to this also: most fonts are not free to distribute, so you can''t simply include a font with your game. IANAL, but I''m pretty sure that''s not a problem when using the bitmap font approach because the game can be considered a derivative work.

Share this post


Link to post
Share on other sites