Issues with FR165 (vector font face, packing format)

I just tried to add the FR165 to my app and noticed two things:

The device reference lists Pridi as standard font and there is a scalable PridiRegular to match it. But I cannot access that vector font. Tried to specify "Pridi", "PridiRegular", "PridiRegularGarmin" (from font name from simulator.json), "Pridi-Regular", "Pridi-Regular_Garmin" (file names), but none of them work.

Does anyone know how to access "Pridi" as vector font?

The other weird thing is that while it being a 5.1.0 device, the compiler reports:

WARNING: fr165: D:\ProjectsLocal\evccg\evcc-garmin\resources-drawables\fr165\drawables.xml:83,4: Device doesn't support given format 'png', reverse to default format.

Top Replies

  • I just tried to add the FR165 to my app and noticed two things:

    The device reference lists Pridi as standard font and there is a scalable PridiRegular to match it. But I cannot access that…

All Replies

  • I just tried to add the FR165 to my app and noticed two things:

    The device reference lists Pridi as standard font and there is a scalable PridiRegular to match it. But I cannot access that vector font. Tried to specify "Pridi", "PridiRegular", "PridiRegularGarmin" (from font name from simulator.json), "Pridi-Regular", "Pridi-Regular_Garmin" (file names), but none of them work.

    The TrueTypeFonts SDK sample has a hardcoded list of fonts to use, including "PridiRegular" and "PridiRegularGarmin". It detects which fonts are supported on the current device by calling getVectorFont() on each font in the list, and displays all supported fonts when the user opens the Font Mapping menu in the app.

    - For fr165/fr165m, it lists PridiRegular and not PridiRegularGarmin, which is what I would expect based on simulator.json

    - For fenix7xpro (for example), it lists PridiRegularGarmin and not PridiRegular, which is also what I would expect based on simulator.json

    Are you able to load other vector fonts? What does your code look like?

    The other weird thing is that while it being a 5.1.0 device, the compiler reports:

    WARNING: fr165: D:\ProjectsLocal\evccg\evcc-garmin\resources-drawables\fr165\drawables.xml:83,4: Device doesn't support given format 'png', reverse to default format.

    I think this is because fr165/compiler.json lacks the imageFormats key, unlike fr165m. idk whether this is intentional/correct, but I can see a precedent in other device files, where venusq2m has imageFormats but venusq2 does not.

  • - For fr165/fr165m, it lists PridiRegular and not PridiRegularGarmin, which is what I would expect based on simulator.json

    Hmmm, either I am completely crazy, or Garmin secretly updated the devices files and their website.

    I could swear that when I checked it, the website said "Pridi" for the standard fonts (FONT_MEDIUM, FONT_SMALL etc.) and in the simulator.json there was only an entry for PridiRegularGarmin. Also I thought I did try PridiRegular and it did not work.

    Now when I check the page it says Roboto for those standard fonts, and the simulator.json as you say has PridiRegular. Also I tested it now and it works. But anyway, I want to mimik the standard fonts, and will go with RobotoRegular now (which already worked in my first test).

    BTW, the files are dated April 13, so I guess it's me and not Garmin. Wink

  • But anyway, I want to mimik the standard fonts, and will go with RobotoRegular now (which already worked in my first test).

    Haven't tried this but can you use the following code for CIQ 5.1.0 devices?

    var font = Graphics.getVectorFont({ :font => Graphics.FONT_MEDIUM, :scale => 1 });

    Or maybe even:

    var font = Graphics.getVectorFont({ :font => Graphics.FONT_MEDIUM ));

    (:font and :scale are new for 5.1.0)

    EDIT actually both :font and :scale need to be specified, and the type checker wants :scale to be a Float. e.g.

    var font = Graphics.getVectorFont({ :font => Graphics.FONT_MEDIUM, :scale => 1.0 });

  • I was wondering the same when I started using vector fonts.

    The documentation says :font is "the font to apply a scale to", and :scale is "the amount to scale the font". So I assume both are needed, though of course :scale may default to 1.

    :font is defined as FontDefinition or VectorFont, so passing in Graphics.FONT_MEDIUM compiles, but I then always got an exception thrown (don't remember which one). Maybe they actually only implemented the VectorFont variant, so that you can scale an existing vector font.

    I also started a forum thread, but there was no conclusion in regards to :font and :scale.

    https://forums.garmin.com/developer/connect-iq/f/discussion/406764/how-to-use-getvectorfont-font-and-scale

  • You're right, both are needed. If :font is supplied but :scale is omitted, the app is terminated with an obscure runtime error about being unable to convert an object to a Float. (Yeah I know it's probably technically correct as it probably refers to converting null to a Float.)

    I did manage to get this to work in the simulator for fr165m, by modifying the TrueTypeFont sample.

    --- ./TrueTypeFonts/source/MenuItems/TrueTypeFontsAngledText.mc 2025-03-06 
    +++ "./TrueTypeFonts - Copy/source/MenuItems/TrueTypeFontsAngledText.mc"   
    @@ -145,7 +145,7 @@
             var cy = dc.getHeight() / 2;
    
             // Draw the angled text given the Scenarios array as parameters.
    -        var font = getFirstAvailableTrueTypeFont(50 * getFontScale());
    +        var font = Graphics.getVectorFont({ :font => Graphics.FONT_XTINY, :scale => 1.0 });
             dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT);
             dc.drawAngledText(cx, cy,
                         font,

    btw I should've mentioned the changelog for SDK 8.0.0 says:

    New Features

    • Update getVectorFont() to support system font definitions and a scale factor.

    It seemed clear to me that "system font definitions" means "Graphics.[SYSTEM_]FONT_*", and that this feature was probably added to fulfill exactly your use case.

  • I did manage to get this to work in the simulator for fr165m, by modifying the TrueTypeFont sample.

    I just tried this again in my app, with SDK 8.1.1. While getVectorFont() does not throw an exception, it does return null. Now I remember that this was also the issue when I tried it in the first place.

    Here is my code:

    var vectorFont = Graphics.getVectorFont( { :font => Graphics.FONT_MEDIUM, :scale => 1.0 } );

    Have you tried doing an actual draw call with the result you get from getVectorFont() using :font and :scale?

  • Now tried it with FR165 and there it works for me as well.

    Before I tested with the Epix2Pro47mm, which also is a CIQ 5.1.0 device, isn't it?

  • Have you tried doing an actual draw call with the result you get from getVectorFont() using :font and :scale?

    Yeah I tested it with the angled text part of the  TrueTypeFonts SDK sample as outlined above.

    Before I tested with the Epix2Pro47mm, which also is a CIQ 5.1.0 device, isn't it?

    Yeah, but as per epixpro47mm/simulator.json, its "standard system fonts" [*] are *not* TTF (so they must be raster fonts).

    [*] corresponding to Graphics.[SYSTEM_]_FONT_*

  • Ah, understand. Makes sense. I expected that the SDK knows which of the scalable font faces equals to the one used by the standard fonts, but when looking under the hood a bit it becomes clear that there is no such link.

    Might be nice to have that dependency explained in the getVectorFont() documentation, and also document if a standard font is scalable in the device reference.

    It can be somehow discerned from the fact that for the FR165, the font column is the same for all standard font sizes, while for devices like the Epix2Pro there is a font for each size, with the size in its name. But you really need to know what you are looking for ...