The font returned from Graphics.getVectorFont() is way too large on the F265/F265s/F965/Venu3/Venu3s.
This is what it should look like on all watches:
Venu3:
Related bug in the simulator: forums.garmin.com/.../simulator-bug-with-scalable-fonts
The font returned from Graphics.getVectorFont() is way too large on the F265/F265s/F965/Venu3/Venu3s.
This is what it should look like on all watches:
Venu3:
Related bug in the simulator: forums.garmin.com/.../simulator-bug-with-scalable-fonts
I began with fr965, so I think the other way, bug is in all others (group 1)
I didn't try doubled Fontsizes, but made something like this for group 1:
the Factor depends on the Fontsize and i have tried and change it till it looks the same.
This is working in Simulator for all Devices until they change/fix this ;-)
I wrote at test app to see what is going on, both in the sim and the real devices. In both cases, the font size issues is dependent on the font, not on the device. So, whatever compensation factor calculation you are doing, it needs to be font-specific, not device specific.
Unfortunately, the sim's support for scalable fonts is so messed up, it is hard to ensure that an app/WF will look right on all the supported devices.
Garmin: Please fix the sim ASAP. Without this fix, I'm hesitant to publish any apps using scalable fonts since I can't test on all the actual supported devices.
Here is the test app on the sim. I added a bounding box in Garmin's sample app's "Font Mapping" page.
Code:
function onUpdate(dc as Dc) as Void { dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_BLACK); dc.clear(); dc.setPenWidth(1); dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT); var inset = dc.getWidth() / 8; var cx = inset; var cy = dc.getHeight() / 2 - (_maxLinesPerScreen * _fontSize) / 2; var just = Graphics.TEXT_JUSTIFY_LEFT; var colors = [Graphics.COLOR_RED, Graphics.COLOR_GREEN]; for (var i = _viewId * _maxLinesPerScreen; i < (_viewId + 1) * _maxLinesPerScreen && i < _fontsArray.size(); ++i) { var vectorFont = Graphics.getVectorFont({:face =>_fontsArray[i] , :size => _fontSize}); var dy = dc.getFontHeight(vectorFont); dc.setColor(colors[i%2], Graphics.COLOR_TRANSPARENT); dc.drawRectangle(cx, cy, dc.getWidth() - inset*2, dy); dc.setColor(Graphics.COLOR_WHITE, Graphics.COLOR_TRANSPARENT); dc.drawText(cx, cy, vectorFont, "Ay0!'.]:" + _fontsArray[i], just); cy += dy + 4; } dc.setColor(Graphics.COLOR_BLUE, Graphics.COLOR_TRANSPARENT); dc.drawText(dc.getWidth()/2, dc.getHeight() / 8, Graphics.FONT_XTINY, (_viewId + 1) + " / " + _viewIdMax, Graphics.TEXT_JUSTIFY_CENTER); }
What this says to me, is it may not be the SDK, but the font files specified in the simulator.json files for the devices.
Which might me good news. Devices can be updated and done fairly quickly, without waiting for an SDK update that takes longer. Do a bug report and list the specific fonts and devices where you see an issue.
I found this order of fonts works best for me:
var C_FONTS = [ "RobotoCondensedBold", // D2 Mach 1, Epix 2/42/47/51, F7, FR265/s FR255, FR965, MARQ 2 "RobotoCondensedRegular", // D2 Mach 1, Epix 2/42/47/51, F7, FR265/s, FR255, FR965, MARQ 2 "RobotoRegular", // Venu 3, FR265/s, FR255, FR965 ] as Array<String>;