Userlib: Gdi fonts. Allows any font in any gadget!
BlitzPlus Forums/BlitzPlus Programming/Userlib: Gdi fonts. Allows any font in any gadget!
| ||
Just completed a rather handy userlib :) http://www.acsv.net/acsite/viewsoftware.php?id=46 http://skn3.acsv.net/files/gdifont_userlib.zip Allows you to load in fonts using the windows GDI functions. (bypassing the blitz font system) You can load any type font, from any location. Quickly and Simply! Ontop of that, you can set any gadget to use one of these fonts (see image) Wohay. Oh yeah, there is now also the possability to strikeout text, and set variable weight amount. Enjoy |
| ||
The EXEs don't seem to work here or another users machine - both with Win98. Not sure why. Throws an error "userlib function not found". |
| ||
Ohhh right.. the functions i used to register the font in the font table are not in 95/98.. i'll change the mto the ones that are. |
| ||
Try redownloading. It should fully work now :) |
| ||
It works now, but I had to make a few amendments to your source. First I had to refresh the gadget to get it to reflect the font change: In example 1: SetGadgettext button,GadgetText(button) In example 2: SetTextAreaText textarea, textareatext(textarea) I also changed your rootfolder$ line to: rootfolder$ = CurrentDir() And the last line to something like: RemoveGdiFontResource(rootfolder+ "font2.ttf") Hope this helps. |
| ||
Ah right, in debug mode it doesn't refresh properly. I fixed it using a windows Api 'InvalidateRect' command. Plus changed the CurrentDir thing as you suggested. Thanks |