Announcement

Collapse
No announcement yet.

Large font size

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

  • Large font size

    I'm trying to convert Arial Black with height greater than 16 and it doesn't seem to be working.

    I'm doing the unicode GCI method so I save the GCI to the uSD, create a corresponding DAT set to 0 offset then use file_LoadImageControl() to create a handle and pass that handle into txt_FontID() then set the appropriate unicode page.

    This method works perfectly for height 16 or less. I tried 18, 20, 22, and 24 and it shows up no bigger than the 16.

    Any idea what's going on here?

  • #2


    There was a restriction with a font of about that size with earlier PmmCs, but I would have thought you would be using a more recent version.

    How much RAM is left when your program runs?

    Is it possible to paste a small cut down demonstration of the problem?
    Mark

    Comment


    • #3
      I did find something about font restrictions in old PmmCs that you mention when searching the forums before posting. But that said something like it was resolved post R29. I'm running R32 (re-programmed just in case)
      HTML Code:
      wavefont_handle := file_LoadImageControl("ArialB20.dat", "ArialB20.gci", 1);
      
      gfx_MoveTo(175, 5);
      txt_FontID(wavefont_handle);
      unicode_page(0x0000, 0x00FF, 0x20);
      txt_Set(TEXT_COLOUR, WHITE);
      txt_Opacity(TRANSPARENT);
      putstr("1310");
      This works with the ArialB16.dat and ArialB16.gci (16 and 20 files attached)There's 10k RAM from mem_Heap() call. Attached files ArialB.zip (7.5 KB)

      Comment


      • #4


        Sorry, I cannot recreate this.

        I used the R3.2 PmmC and the files you attached, I also generated my own 40 point file.

        The following works fine.
        #platform "uLCD-43PT"
        #inherit "4DGL_16bitColours.fnc"


        func main()
        var D, *Ihndl, wavefont_handle, wavefont_handle2, wavefont_handle3 ;


        if (!(D:=file_Mount())) // mount the drive
        while(!(D:=file_Mount()))
        putstr("Drive not mounted...");
        pause(200);
        gfx_Cls();
        pause(200);
        wend
        endif

        wavefont_handle := file_LoadImageControl("ArialB20.dat", "ArialB20.gci", 1);
        wavefont_handle2 := file_LoadImageControl("ArialB16.dat", "ArialB16.gci", 1);
        wavefont_handle3 := file_LoadImageControl("Arial40.dat", "Arial40.gci", 1);
        gfx_MoveTo(175, 5);
        txt_FontID(wavefont_handle);
        unicode_page(0x0000, 0x00FF, 0x20);
        txt_Set(TEXT_COLOUR, WHITE);
        txt_Opacity(TRANSPARENT);
        putstr("1310");
        gfx_MoveTo(175, 25);
        txt_FontID(wavefont_handle2);
        unicode_page(0x0000, 0x00FF, 0x20);
        txt_Set(TEXT_COLOUR, WHITE);
        txt_Opacity(TRANSPARENT);
        putstr("1310");
        gfx_MoveTo(175, 45);
        txt_FontID(wavefont_handle3);
        unicode_page(0x0000, 0x00FF, 0x20);
        txt_Set(TEXT_COLOUR, WHITE);
        txt_Opacity(TRANSPARENT);
        putstr("1310");
        repeat
        forever
        endfunc
        Which display are you using? (not that should make any difference)
        Mark

        Comment


        • #5


          I'm using a uLCD-32P-I. (we ordered about 100 units with no touch)
          And if it matters, v 0.2.0.3 of Font Tool (from file properties).

          Comment


          • #6


            I tried it with 28, 32 and 40. That worked.

            I guess 18, 20 and 24 also works but not quite in the way I was expecting.

            I expected those 3 to be larger than 16; instead, all three are being displayed as smaller than 16.

            Comment

            Working...
            X