I'm using .pgf fonts in my Homebrew. My problem is that they don't work when I use them with the Virtual File System.
Here's what I've done so far:
- Created a C structure of my .pgf file using bin2c and included the code to my source which looks like this:
Code: Select all
const unsigned char font_data[41793]={0x4f,0x53,0x4c,0x46,0x6f,0x6e,0x74,0x20,0x76,0x30,0x31,0x00,0x01,...}
Code: Select all
void setUpVirtualFileMenu(void)
{
OSL_VIRTUALFILENAME ram_files[] = {
{"ram:/font.pgf", (void*) font_data, sizeof(font_data), &VF_MEMORY}
};
oslAddVirtualFileList(ram_files, oslNumberof(ram_files));
}
Code: Select all
OSL_FONT* font = oslLoadFontFile("ram:/font.pgf");
By the way, when I load .pgf fonts directly without putting them into RAM it's working, but that's not my intention.
Does someone have any idea what the reason could be?
Thanks in advance,
DAan