No announcement yet.

Must I set text size before every print?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Must I set text size before every print?

    I've used a few 4D Systems screens in the past but that was I few years ago. I'm now using a uLCD-144-G2 in GOLDELOX designer mode and have an odd problem. I've produced a simple test program to illustrate it.

    #platform "GOLDELOX"
    func main()
    txt_Set(TEXT_WIDTH, 2);
    txt_Set(TEXT_HEIGHT, 2);
    print("Hello World\n");
    txt_Set(TEXT_WIDTH, 2);
    txt_Set(TEXT_HEIGHT, 2);
    print("Hello ");
    repeat forever
    When I run this, the first "Hello World" is printed with the requested text size multiplier of 2. However in the second case, when the "Hello" and "World" are split between two print statements, the "Hello" displays with the text size multiplier of 2, but the "World" is displayed as if the text size multiplier was the default of 1, i.e. "Hello World"

    I don't recall previouslly it being necessary to set text sizes before every print. Is this now the expected behaviour?

    Acording to the PmmC loader my screen has the lastest version.

  • #2
    Hi Jack,

    Welcome to the forum.

    Yes, you need to set the size before every print.

    I hope this helps.

    Best Regards,


    • #3
      Thanks for that Ferdinand. Do you know if this is a Goldelox thing as I don't understand how I've not noticed it before or found it mentioned in the documentation?

      I've just tried the same simple test program on a Gen4-uLCD-43DT (Diabalo) and an old Picaso screen and they both work as expected without having to reset the text size after every print. It also seems that gfx_Cls causes the text size on the Goldelox to reset. However things like colour are not reset. Odd, and a bit of a portability headache! I wonder which things I haven't noticed (yet!) are reset. Also calls to putstr, putch and putnum don't reset the text size and I would assume that the compiler simply translates print into sequences of those. It will have to compile extra code to do the reset. I can't see a good reason for print to reset the text size, especially since non Goldelox boards don't. I'm afraid it seems like a bug to me.

      Regards Jack