FONT_SMALL/MEDIUM in Forerunner simulator

Hello together,

is it normal, that the font size FONT_SMALL or FONT_SYSTEM_SMALL only works on round watches?
SMALL must be bigger than XTINY but with (all) Forerunner simulators SMALL and XTINY are idetical.

Please take a look in the middle center gauge for steps. On round watch the lower string is bigger than the upper string. In the semi round watch both are similar.

And FONT_MEDIUM looks differend than on round watches in simulator too???
  • I believe the font heights are supposed to be non-descending and you can not make any assumptions about the heights of various fonts between families. i.e., Gfx.FONT_TINY can be the same as or smaller than Gfx.FONT_SMALL. and Gfx.FONT_LARGE could be smaller than, equal to, or taller than Gfx.FONT_SYSTEM_LARGE.

    I haven't tested this code, but it should verify that font heights are non-descending within the same family. Assuming it compiles, it should pass.

    using Toybox.Graphics as Gfx;
    using Toybox.Lang as Lang;
    using Toybox.System as Sys;
    using Toybox.Test as Test;

    const _font_names = [
    "FONT_XTINY",
    "FONT_TINY",
    "FONT_SMALL",
    "FONT_MEDIUM",
    "FONT_LARGE",
    "FONT_NUMBER_MILD",
    "FONT_NUMBER_MEDIUM",
    "FONT_NUMBER_HOT",
    "FONT_NUMBER_THAI_HOT",
    "FONT_SYSTEM_XTINY",
    "FONT_SYSTEM_TINY",
    "FONT_SYSTEM_SMALL",
    "FONT_SYSTEM_MEDIUM",
    "FONT_SYSTEM_LARGE",
    "FONT_SYSTEM_NUMBER_MILD",
    "FONT_SYSTEM_NUMBER_MEDIUM",
    "FONT_SYSTEM_NUMBER_HOT",
    "FONT_SYSTEM_NUMBER_THAI_HOT"
    ]

    function compare_font_height(logger, f1, f2)
    {
    var h1 = Gfx.getFontHeight(f1);
    var h2 = Gfx.getFontHeight(f2);

    var n1 = _font_names[f1];
    var n2 = _font_names[f2];

    if (h2 < h1) {
    // this is not expected
    logger.error(Lang.format("$1$ is taller than $2$.", [ n1, n2 ]));
    return 1;
    }
    else if (h2 < h1) {
    // this is an expected case
    logger.debug(Lang.format("$1$ is shorter than $2$.", [ n1, n2 ]));
    }
    else {
    // this is acceptable, but probably not the norm
    logger.debug(Lang.format("$1$ is the same height as $2$.", [ n1, n2 ]));
    }

    return 0;
    }

    function verify_font_heights(logger, fonts)
    {
    var total = 0;

    for (var i = 1; i < fonts.size(); ++i) {
    total += compare_font_heights(logger, fonts[i-1], fonts);
    }

    return total;
    }

    (:test) function test_font_heights(logger)
    {
    var total = 0;

    total += verify_font_heights([
    Gfx.FONT_XTINY,
    Gfx.FONT_TINY,
    Gfx.FONT_SMALL,
    Gfx.FONT_MEDIUM,
    Gfx.FONT_LARGE,
    Gfx.FONT_NUMBER_MILD,
    Gfx.FONT_NUMBER_MEDIUM,
    Gfx.FONT_NUMBER_HOT,
    Gfx.FONT_NUMBER_THAI_HOT
    ]);

    total += verify_font_heights([
    Gfx.FONT_SYSTEM_XTINY,
    Gfx.FONT_SYSTEM_TINY,
    Gfx.FONT_SYSTEM_SMALL,
    Gfx.FONT_SYSTEM_MEDIUM,
    Gfx.FONT_SYSTEM_LARGE,
    Gfx.FONT_SYSTEM_NUMBER_MILD,
    Gfx.FONT_SYSTEM_NUMBER_MEDIUM,
    Gfx.FONT_SYSTEM_NUMBER_HOT,
    Gfx.FONT_SYSTEM_NUMBER_THAI_HOT
    ]);

    return total == 0;
    }

    class TestApp extends App.AppBase
    {
    function initialize() {
    AppBase.initialize();
    }

    function getInitialView() {
    return null;
    }
    }
    [/code]

    That said, the fonts should be the same between the simulator and actual devices.

    Travis
  • Appendix B of the UX Guide in the SDK describes the fonts for each device (but doesn't seem to include the FONT_SYSTEM_* ones.)

    Here are the text fonts for the 23x,630, 735 for example:
    Constant Name Font Name Font Size Bold
    FONT_XTINY Roboto 19 &#10003;
    FONT_TINY Roboto 19 &#10003;
    FONT_SMALL Roboto 19 &#10003;
    FONT_MEDIUM Roboto 24
    FONT_LARGE Roboto 32 &#10003;


    You'll notice that FONT_SMALL,FONT_TINY, and FONT_XTINY are all the same. (looks like the columns didn't come thru correctly, but they all have the size of 19 and bold)
  • Fonts are different on different devices

    Oh, thanks for the hint.
    I thought the fonts look the same on all devices.
    The appendix I had not yet read - that explains a lot
    It is important that the font is displayed correctly in the simulator and it does so obviously.
    "Who can read is clearly in the advantage":D
  • The sim is really good at showing how each font looks on each target, and yes, the fonts vary between devices.

    One thing to note about the number fonts, is there they not only vary between devices, but the available characters vary by font. For example, some support the "degrees" character, some don't, some support "a" and "p" (for am/pm), and some don't, etc.