No announcement yet.

Migrating : Mixing font + graphic elements on SD card with Serial uOLED

  • Filter
  • Time
  • Show
Clear All
new posts

  • Migrating : Mixing font + graphic elements on SD card with Serial uOLED

    I'm revisiting a project using uOLEDs. I used to work with the older PMMC long ago, circa 2007 and I'm now porting my code to the newer SPE system and API.

    I'm using a uOLED 96 and 128.

    I have a bunch of concerns :

    1) My main issue are the custom characters. I used to create them on the fly with the available RAM in the controller. Now of course this has been replaced by custom font display. I'm looking for a comprehensive explanation about how to create and transfer a font to the SD card.

    ** From what I understood, I can create a font file with the font tool. What format do I use to export ?
    ** then I need to copy this to the SD card in RAW format.

    this is where I face an issue. In the past, I used graphic composer to install videos and pictures on the SD card, at sector offsets decided by GC. I've looked at a VISI example that is used to install a font and another one here

    that explains how to use a script to load the font at a specific offset of the card but I'm unsure how to use it. It mentions a .dat file in which the sector is defined, I haven't found any clear documentation on this.

    2) admitting that I can produce the font and store it on the SD card, how do I ensure that GC will not overwrite it ? do I need to manually define where to store the font(s) then use GC to store my media at the beginning of the SD card ?

    At the end, I need to combine both resources (fonts + video / pictures) on the same SD card. Once all set, I can replicate the card with HXD or any cloning device but I need a reliable recipe to install resources on the card, even if it's 2 stages (like font first then GC)

    is there a practical example of the script above usage with an actual font file ?

    Any pointers would be appreciated thanks

  • #2

    This appnote may help with your custom fonts concern

    This appnote will help with your migration

    And this appnote will explain how to use Visi to create GFX for the SD card

    I hope this helps

    Best regards



    • #3
      it's not helping at all sorry. I don't have a problem with migrating per say (which basically just changes the serial commands and headers sent to the display). I've read that AN 084 and it doesn't explain how to store the file at a desired location. I was already able to play / display media from the SD card using graphic composer to store them.
      I need pointers to store also the font to the desired location of the SD card so that I can further use it (fontID = 7)

      The link in my OP talks about a script to transfer files to specific sectors but I can't find proper info about how to achieve this in details


      • #4
        If you use ViSi, and create a dummy (or real) program with all the font and images, when you build it, workshop will copy them all to the uSD one after the other.

        The file created during the build will list all the offsets on uSD for each file and font.


        • #5
          thanks a lot, I didn't realize that you could pile up all resources this way. I like how graphic composer works as you can arrange the media the way you want rather than dropping the resources one on top of the other but still, that seems to work.
          I also managed to use the script to write sectors to the uSD and that works too after some tweaking (including the fact the terminal must run as admin to have access to the SD card writing)

          I now have an issue with the font itself. I took all my former special chars and made a .FON font with fony. I can see it in the workshop and preview properly the font / string and it even gets uploaded to the SD card.
          However, when I try to display a char, it's like there's an offset on what is read and the char gets distorted. I tried to remap the font to either 7x8 or 8x8 the result is the same. The way it looks is like there are extra or missing pixels like if the char was 7x8 pixel but more or less is read, and the next char has some pixel shifted (and the error propagate to the next chars).

          If I use a font like a TTF or OTF, it works ok. 4D stock fonts seem to be .FON fonts, is there something incompatible with that format or should I convert it to another format ?

          thanks again


          • #6
            I got it to work after altering several time the size of the font, not sure what was wrong intially as I used one of the 4D fonts as a template. Will now try to upload more media. Thanks a bunch ESP for your help


            • #7
              Just wondering why you don't let Workshop create the uSD? You can then 'clone' it using the scripts, but at least you only need to manage one image that way.

              You need to use Admin mode because Windows doesn't allow sector writing in 'user' mode.

              Not sure why you were having issues with the fonts. I thought you might have been trying to draw them as frames rather than used FontID, but since you got it working I wonder.