Search code examples
codenameone

Latest release of codenameone has defaulted to very tiny text? Did I do something wrong?


I got my feet barely wet with codename one 6 months back or so. I just upgraded to latest and am following some tutorials which are not explaining how to make the text so I can actually read it.

More specifically, I bought the book Creating an Uber Clone In 7 Days before sketch

My pictures are definitely not matching the books pictures without doing some guessing and extra work for some reason.

Right out of the gate, the empty template shows this in the designer(and the phone simulator is the same).

enter image description here

That picture is a little zoomed in meaning it's even smaller on my monitor!!!

I also tried just my macbook pro turning off my 32" screen to make sure it wasn't just from me doing it on a huge monitor. Same exact results, same size. It's like an old 90's game with it's old school graphics.

any ideas how to fix this? or do I just modify the "[Default Style]" which was checked to 'Derive'. If I modify it to from blank to native:MainThin AND size Medium to millimeters and finally 12 to 7. ps. What's the 12 even mean if 'Medium' is selected. Seems like 12 should be grayed out if Medium is selected(I think).

Any ideas on this? Until then, I am just going to use 7 mm I think. Seems to work much better although, there are still some VERY hard to read lines of text. Not sure why those fonts are not changing. For example, read the text "This is a Label" which is very very small below...

enter image description here

EDIT: This is a picture of eclipse 2019-12 / codenameone 6.0.0 and notice the design is previewing the incorrect sizes while the simulator(on the right has the larger sizes)

enter image description here

thanks, Dean


Solution

  • The design preview has different density from the simulated device. As such the preview in the designer will show the fonts as they would look on a low density device unless you significantly increase the screen size to match that of the simulator (which won't leave much room for the design itself).

    The size in the simulator is the thing that counts, I'm not sure why you see a major difference between the eclipse and intellij designers. Both should use the same designer jar file that's located in your ~/.codenameone directory.