Jump to content
  • Advertisement

Archived

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

Ranok

Resources

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

I don't know for sure, but in Andre Lamothe's new book he says it is a big pain in the behind. I think he said look it up in your Win32 API and didn't really cover it much.(About the only thing he didn't cover in this volume)I'd be interested myself though.

------------------
Still Learning...

Share this post


Link to post
Share on other sites
Advertisement
I have a few ideas but the main problem is the windows font functions only use the font's in the Windows\font directory I can't access them from anywere else.

So if anyone know how to access windows font else were on the hard disk no problem?

Other wise if you create you own font handler for BMP font's then you can include that as a resource and access the data directly as binary or a BMP.

Share this post


Link to post
Share on other sites
Well, you probably need to take a look at the help files regarding LOGFONT and the GDI version of DrawText, which is the non-MFC way of doing things text-related. Your font is held in your device context (CDC).

I will warn you that this isn't going to be easy though, and you're going to have to be really careful to ensure that your text routines will work on all systems.

Luck.... "Here there be dragons".

-fel

Share this post


Link to post
Share on other sites
Took a look at LOGFONT data structure which is used with CreateFontIndirect() which from what I can see is just anouther way of performing the same task as CreateFont().

Thanks for taking a look

For my needs I want to access a font from a resource or file external to the system so if the application crash's or is terminated the font is not left on the system.

I think I will end up creating a bitmap font class which is perfect for my needs and then keep the data as a resource.

Share this post


Link to post
Share on other sites
Well, you're going to have to use the windows font table regardless, but you can use AddFontResource to get your super-spiffy special font into the system font table.

Then continue as noted above.

It's probably nice of you to clean up by calling RemoveFontResource, though if you crash this will be a little hard. It works for termination though.

-fel

Share this post


Link to post
Share on other sites
I think that I will end up creating my own bitmap fonst also( this way I can do alpha blending also ), but it would still be usefull to load the font from a resource or an external file. Thanks for ideas, though.

[This message has been edited by Ranok (edited November 04, 1999).]

Share this post


Link to post
Share on other sites
I was wandering how you would go about loading a file from a resource without using MFC. What I am trying to do is load a font file out of the resource and use it to diplay fonts in DirectX. Does anybody know how to do this?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!