Font availability

Started by
4 comments, last by pan narrans 21 years, 10 months ago
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!
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
Advertisement
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.
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!
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
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
K, it works, cheers!

Tis so simple *blush*

When I searched my MSDN library for ''register font'' it came up with about 70 useless files
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
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.

This topic is closed to new replies.

Advertisement