Include fonts in applications
I just can't find how to include fonts in my app. I tried copying the FOND resource of a font to my app, but Resedit say 'Resource not found'.
But how do i embed it in my app ?
It depends on what type of font it is; PostScript, TrueType, or Bitmapped. In general, you need to include the FOND, FONT (if any) and nfnt (if any) resources. This will only cover "screen fonts" if it's PostScript, not the printer font.
I have a similar problem I believe. I wish to know how to enbed fonts into my program and I also would like to know how I might get all the fonts from the system. There are constants for _geneva, and all the others and most of them work but my problem is I want my font menu to be like simple text's, full of the system fonts read automatically. Also I need to make sure the user of my program has access to a few designated fonts (built in) or at least I could include a folder with the fonts that they need to add to the system folder. Then my only problem would be reading the system fonts into the menu. One other problem I am having is justification. I have an edit field with a negetive ID of course, and I want it to be capable of multible just's. (For instance, the title of the edit field would be centered and the text below would be left just. Thanks to anyone who can help me!
DOCMaker holds every fonts contained in the document in its resource fork. That's black magic to me. When looking at the resource fork of a DOCMaker document, i just can't see any FOND or FONT resources. I don't know if someone have some code to do the same in FB, but i'm sure a lot of users would like to take a look at it. (including me :-)
I'm new to this list & missed the original post, but may I jump in?
DOCMaker may hold some kind of reference or pointer to the fonts used in the document in its RSRC fork, but it doesn't hold the font itself. If you launch a DOCMaker document containing a font not installed on your computer, you will get the usual warning message that a font is not installed, a guess as to what that might be, and a warning that the document may appear different (font substitution occurring).
Roger M. Clary
I was going to say this way back when, but never got around to it. I'm definitely no expert on this subject, but I have had some experience with it. I'm still not 100% sure that this is a garaunteed way to ensure that you won't have conflicts, but it hasn't failed me yet (knock on wood).
Whew. You took a _big_ risk; some of those "128 and up" numbers are reserved. I checked IM (table 4.1 in the online version of IM: Text): the font ID numbers available to you, me and Adobe Systems are the range 1024-16382. Newer font utilities go by name before number, but there don't seem to be many guidelines on this.
You should be very cautious about "hiding" fonts in your app.Unless you created the font, or have permission from the creator(s) of the font, you could be in legal doo-doo.