Skip to main content
GameDev.net gamedev.net
🔒 Locked

Direct3D Font - Loading From Resources

Started by cyric74 Nov 1, 2005 at 10:32 AM 0 replies 850+ views
Original Post
cyric74
cyric74
Hello--trying to figure out a problem I had with my 4E4 entry that drove me insane last night. I wanted to load my internal font file from resources, which worked fine, using PrivateFontCollection. The problem came when I tried to load the Direct3D Font with the Windows font from PrivateFontCollection. It just refused to display the font, and defaulted to Arial, even though the proper custom font was loaded with no exceptions! I could find no information on the net about this, and GameDev was down, so my 4e4 entry suffered. I'd like to repackage for people to try, but I don't want them to have to manual install the custom font. Could anyone give me some hints or a tutorial on how to get Direct3D Font to load and display from an embedded font resource? Thanks
circlesoft
circlesoft
Here is a thread that I remember about this same issue. Using PrivateFontCollection with D3DXFont seems to be kind of iffy, for some reason. Like DrukenHyena suggested at the end of that thread, I would try going with PInvoke to call AddFontResource() and RemoveFontResource().

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.