• Advertisement

Archived

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

Fonts in GDI

This topic is 5717 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

Does anyone know if its possible to use a True Type Font with the TextOut functions?

Share this post


Link to post
Share on other sites
Advertisement
Ok, do I accomplish this? I looked through the MSDN, and cannot find a function that use a TTF.

Share this post


Link to post
Share on other sites
Just use the appropriate font, like Times New Roman. You can use OUT_TT_PRECIS flag to tell CreateFont[Indirect] to use TrueType font if both TT and bitmap fonts are available.

Share this post


Link to post
Share on other sites
quote:
Original post by IndirectX
Just use the appropriate font, like Times New Roman.


...which will work fine if the font is installed; it''s more difficult if you need to use a TTF font directly. Depending on the application it might not be possible or desirable to install the font first.

Share this post


Link to post
Share on other sites
quote:
Original post by spock
...which will work fine if the font is installed; it''s more difficult if you need to use a TTF font directly. Depending on the application it might not be possible or desirable to install the font first.


Just use AddFontResource.

Share this post


Link to post
Share on other sites
quote:
Original post by IndirectX
Just use AddFontResource.


Cool, I didn''t know you could do that. You learn something new every day. Thanks, IndirectX.

Share this post


Link to post
Share on other sites

  • Advertisement