[futurebasic] Re: [FB] Fonts in the Resources Folder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2010 : Group Archive : Group : All Groups

From: Robert Purves <listrp@...>
Date: Mon, 8 Nov 2010 19:32:14 +1300
Brian S wrote:

> For any following this thread, the situation is:
> (1) The new font activation code to use a font ( or fonts ) from yourApp/Contents/Resources/Fonts  is working except for one font
> (2) The font that doesn’t work is an old-style bitmap font with a resource fork in the file and many resources in it.
> (3) Running in FB5 the font works fine but fails when built directly in Xcode
> (4) Rich found that building in Xcode ( i.e. not via FB5 ) removes the resource fork from the file when it is copied to the Resources folder. This obviously corrupts the font and causes the activation to fail.

All released versions of FBtoC have a bug relevant to the behaviour described above.
"Make Xcode Project" mis-handles old style (Resource Manager) resource files, in such a way that the resource fork gets stripped during an Xcode build.

Almost every Resource Manager function in the built app, such as Get1Resource(), would therefore fail.

This bug has been fixed for the next release FB 5.4.8. 
The template Xcode project has a new build phase "Build Resource Manager Resources" that correctly handles resource-fork resources; they are converted to data-fork while being copied to <app>/Contents/Resources. Previously we used the build phase "Copy Bundle Resources", which is intended for modern data-fork resources (main.nib, MyApp.icns, AnImage.png...).

Robert P.