Announcement

Collapse
No announcement yet.

Is there a maximum number of custom fonts?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a maximum number of custom fonts?

    Hello all. Like the subject suggests, is it safe to assume that there is a maximum of 6 custom fonts you can load?

    ulcd-32pt

    I am currently loading 22 fonts in to 22 different fontVariables, but only the first 6 seem to actually load. Commenting out the first 6 and loading the remaining again gives me 7,8,9,10,11,12 fonts and not the rest. When I say "gives me" I mean that I have a simple routine that ...
    Code:
    .up to arialBold10
    .
    .
    gfx_Cls();
    lcdString(1,1, 1, 1, WHITE,arialBold50,"aBold50","  ");
    pause(1500);
    gfx_Cls();
    lcdString(1,1, 1, 1, WHITE,arialBold60,"aBold60","  ");
    pause(1500);
    gfx_Cls();
    lcdString(1,1, 1, 1, WHITE,arialBold71,"aBold71","  ");
    pause(1500);
    gfx_Cls();
    lcdString(1,1, 1, 1, WHITE,arialBold80,"aBold80","  ");
    pause(1500);
    gfx_Cls();
    .
    .
    .up to arial91
    after the first 6 fonts the remaining appear as if I am using the built in FONT1 or FONT2 not sure.
    I am loading the fonts like this:
    Code:
     /*
        arialBold10 := file_LoadImageControl("Op12.da1", "Op12.gc1", 1);
        arialBold14 := file_LoadImageControl("Op12.da2", "Op12.gc2", 1);
        arialBold18 := file_LoadImageControl("Op12.da3", "Op12.gc3", 1);
        arialBold22 := file_LoadImageControl("Op12.da4", "Op12.gc4", 1);
        arialBold26 := file_LoadImageControl("Op12.da5", "Op12.gc5", 1);
        arialBold36 := file_LoadImageControl("Op12.da6", "Op12.gc6", 1);
        */
        arialBold50 := file_LoadImageControl("Op12.da7", "Op12.gc7", 1);
        arialBold60 := file_LoadImageControl("Op12.da8", "Op12.gc8", 1);
        arialBold71 := file_LoadImageControl("Op12.da9", "Op12.gc9", 1);
        arialBold80 := file_LoadImageControl("Op12.d10", "Op12.g10", 1);
        //arialBold91 := file_LoadImageControl("Op12.d11", "Op12.g11", 1);
    
        arial10 := file_LoadImageControl("Op12.d12", "Op12.g12", 1);
        arial14 := file_LoadImageControl("Op12.d13", "Op12.g13", 1);
        arial18 := file_LoadImageControl("Op12.d14", "Op12.g14", 1);
        arial22 := file_LoadImageControl("Op12.d15", "Op12.g15", 1);
        arial26 := file_LoadImageControl("Op12.d16", "Op12.g16", 1);
        arial36 := file_LoadImageControl("Op12.d17", "Op12.g17", 1);
        arial50 := file_LoadImageControl("Op12.d18", "Op12.g18", 1);
        arial60 := file_LoadImageControl("Op12.d19", "Op12.g19", 1);
        arial71 := file_LoadImageControl("Op12.d20", "Op12.g20", 1);
        arial80 := file_LoadImageControl("Op12.d21", "Op12.g21", 1);
        arial91 := file_LoadImageControl("Op12.d22", "Op12.g22", 1);
    you can see above what I mean with "commenting out".
    based on the above loading I will see 50,60,71,80,10 and 14 properly and the rest with FONT1.

    Thank you for reading me.

  • #2
    I suspect you are running out of RAM, check that the handle is not 0 after loading the image control.

    Is your program running from RAM or Flash?

    Check out this app note to find out how to run the program from Flash http://www.4dsystems.com.au/appnote/4D-AN-00039/
    Mark

    Comment


    • #3
      Thank you for the quick reply.

      This is the output I get while programming:

      No Errors, code size = 7282 bytes out of 14400 total
      Initial RAM size = 1494 bytes out of 14400 total
      Program will run from ram so total initial RAM size = 8776 bytes out of 14400 total
      Download to RAM successful.

      But loading the program to flash yields the exact same result.

      Regards,

      Dimitris

      Comment


      • #4
        Read the app note, there's more to it than just downloading to flash
        Mark

        Comment


        • #5
          hmmmm now I see. OK since I will be using a parent/child scheme and since there is not a limitation when it comes to the number of fonts, I will try to manage the memory better. Thanks for once more for showing me the way

          Comment

          Working...
          X