how to deal with fonts?

First I was using custom font, but with all characters included like chinese and korean etc this becomes a huge memory filler and then I have to make a different size for all the different devices etc. But then I noticed using default fonts from Garmin they are very different on some devices. I like FONT_SYSTEM on Forerunner 255 etc, but on Venu 2 it looks really ugly.

How to deal with this?

  • Ok, first thing is the FONT_SYSTEM_* and the FONT_* are the same, so FONT_SYSTEM_LARGE and FONT_LARGE are the same for example.  And between devices fonts are different.  With FONT_NUMBER_* fonts the amount of white space above and below the characters vary. And on the Fenix5, FONT_TINY and FONT_XTINY are the same height, but the characters are bold in TINY.

    The way I handle this in in onLayout() (I rarely use layouts), I set the x/y for things, based on the font, the screen size and height of the font. It may seem a bit complex, but once you have something that works adapting to new devices is fairly smooth.

  • You can check how the Crystal watch face does it. Its code is on github and it supports fonts from everywhere and many devices.

  • Ty for your reply!

    As of now I don't really seem to have layout issues on different devices. I gave enough wiggle room everywhere to make it fit nicely. But the Venu font just looks very off with the rest of my design while the same font looks fine on the Forerunner 255. 

    I tried using custom fonts, but to support every language and so on is really a lot of memory waste. Or I have to make a separate font for each device resolution in each language, but that just seems a crazy amount of work. Unless I can somehow batch this? 

  • I have a test app I run to see how fonts look.

    Here's the alpha fonts on the venu2

    and the fr255

    For watch faces, I tend to use custom fonts, but avoid using text, and use icons (a custom font, BTW), and for things like a date, use 5-4 (or 4-5) instead of May 4.  In cases where I want "May 4", I use FOMAT_SHORT and then index into an array for the name in english.

    There was a project years ago where an attempt was made to creat a custom font with all the possible characters in each language, but it became kind of impossible

  • Yeah so basically go with custom for anything number related or fixed text. But any text related based on language setting of the watch just use default fonts and adjust layout to heights of the fonts?