ADC Home > Reference Library > Technical Q&As > Text & Fonts > Carbon >
Important: The information in this document is Not Recommended and should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q I need to find the home file of a given font. Using the Finder's Find File
command doesn't seem to work.
Can you provide some code samples to do this? A Here are some steps that show one way to approach the problem programatically. 1) Find a FOND with the right name (there may be more than one) using GetNamedResource. The first one you find is a good one to start with. 2) On the Handle that's returned, call HomeResFile to find the refnum of the file that contains the resource. 3) Call PBGetFCBInfo on the refnum to determine the location of the file. Note that this won't work if there are multiple refnums for the same file, but in the case of FOND resources, you should be fine. 4) Call GetNextFOND (undocumented, but the function declaration is in Resources.h) with the FOND handle you've just used. 5) If the returned handle is non-nil, go to step 2; otherwise, you're done. [Feb 15 1996] |
|