Hello,
i have a question regarding the usage of 3rd party fonts loaded from the Display's SD card.
Before i worked with Goldelox Displays, where fonts could be placed in raw format on the SD card, and could be loaded by first setting the sector address and then by setting the specific media font ID 7. A similar procedure also works for loading images and videos stored in raw format.
Now i am working with Picaso Displays. I checked the documentation, and i see that it is still possible to load images and videos in raw format same as for Goldelox Displays, but it seems fonts can't be loaded anymore in raw format, instead fonts have to be referenced using a file handle, which you get by using a FAT16 file open() operation. Why is the possibility to load raw fonts missing, isn't that somehow inconsistent?
I am using my own optimized SD card layout to describe which raw format content resides where on the SD card, so i know all sector addresses. FAT16 would just be another way to describe the layout, but for my application it would be oversized and have no gain at all, only serious drawbacks, so i would like to prevent using it and investigate other options.
I see that it is possible to define custom fonts in 4DGL #DATA segments and loading them by passing a pointer to txt_FontID(), so there are already several ways to address fonts: by passing a system font ID, by passing pointers to custom firmware fonts and by passing file handles.
And now to my actual questions:
1. Is it possible in 4DGL code to get a pointer to a raw format font in SD card memory (i would know the address) and to use this pointer with txt_FontID() to load the font similary to using a pointer to a #DATA segment?
2. If not, would it be possible to extend the Picaso PmmC code about an internal function to load raw format fonts like with Goldelox Displays, by setting the sector address first and then by passing a specific media ID to txt_FontID()?
Any help would be appreciated,
Goran
i have a question regarding the usage of 3rd party fonts loaded from the Display's SD card.
Before i worked with Goldelox Displays, where fonts could be placed in raw format on the SD card, and could be loaded by first setting the sector address and then by setting the specific media font ID 7. A similar procedure also works for loading images and videos stored in raw format.
Now i am working with Picaso Displays. I checked the documentation, and i see that it is still possible to load images and videos in raw format same as for Goldelox Displays, but it seems fonts can't be loaded anymore in raw format, instead fonts have to be referenced using a file handle, which you get by using a FAT16 file open() operation. Why is the possibility to load raw fonts missing, isn't that somehow inconsistent?
I am using my own optimized SD card layout to describe which raw format content resides where on the SD card, so i know all sector addresses. FAT16 would just be another way to describe the layout, but for my application it would be oversized and have no gain at all, only serious drawbacks, so i would like to prevent using it and investigate other options.
I see that it is possible to define custom fonts in 4DGL #DATA segments and loading them by passing a pointer to txt_FontID(), so there are already several ways to address fonts: by passing a system font ID, by passing pointers to custom firmware fonts and by passing file handles.
And now to my actual questions:
1. Is it possible in 4DGL code to get a pointer to a raw format font in SD card memory (i would know the address) and to use this pointer with txt_FontID() to load the font similary to using a pointer to a #DATA segment?
2. If not, would it be possible to extend the Picaso PmmC code about an internal function to load raw format fonts like with Goldelox Displays, by setting the sector address first and then by passing a specific media ID to txt_FontID()?
Any help would be appreciated,
Goran
Comment