drawText() positioning differences between Edge520 device and simulator

Hi there,

I've discovered a difference between how text is positioned with drawText() in the simulator vs. an actual device. In this case, I've been using an Edge 520 (as it's the only device I have).
I can lay things out exactly where I want them in the simulator, only to find that they are slightly off on the actual Edge 520 device, as per the pictures attached. Now, maybe it could be argued it's only slightly out, but when you're trying to squeeze the biggest fonts you can into a tiny space, every pixel counts.

In my case, what I've found is that if I add 3 pixels to the Y coordinates and 2 pixels to the X coordinates for the device ONLY, then it displays as expected, but I have to not add these values when in the simulator. It's quite frustrating. fillRectangle() and drawArc() do not exhibit the same behaviour, clearly its related to the font rendering.

Also, there is a difference between what the simulator says is the height of an Edge 520 cell (52 or 53 pixels depending on which cell), vs. 51 or 52 pixels in the actual device.

Is it a bug?


Thanks,
Rob. community.garmin.com/.../1275047.jpg community.garmin.com/.../1275048.jpg community.garmin.com/.../1275049.jpg
  • Unfortunately, the problem still persists with ConnectIQ v3.0.9, I've got updated pictures to upload, but the forum is rejecting them at the moment. However, the differences are the same as per my original post of this thread.
  • We didn't update the fonts for all devices with the 3.0.8 SDK. I need to collect some data on the fonts for the edge520 and edge520plus to see what we can do.
  • We didn't update the fonts for all devices with the 3.0.8 SDK. I need to collect some data on the fonts for the edge520 and edge520plus to see what we can do.


    I have two questions Travis.ConnectIQ:

    1- Based on your comment, is it safe to assume that the other Edge devices should be fine and they are now positioning text in the sim exactly in the same place as it will appear on a real device? In other words, if I setup the text position for an Edge 1030 in the sim with SDK 3.0.9 can I trust that a real Edge 1030 will display the text in the same place? Unfortunately I don't have a 1030 to confirm this. :(

    2- I'm a bit confused now. Can you confirm if the root cause of this problem is a font size/type issue between the sim and the real devices or if it's about text positioning (not related to font size/type)?

    Thanks for looking into this. In my case is real blocker to provide a good experience to users on devices I don't have to test my apps on.
  • 1- is it safe to assume that the other Edge devices ... in the sim exactly in the same place as it will appear on a real device

    No. They should be close, but I know that they are not perfect. Here is a table of the data I collected for a few devices the last time I looked into the font issues (for the 3.0.8 SDK release)

    , device, font, height, ascent, descent
    dev, edge1030, TINY, 22, 18, 4
    sim, edge1030, TINY, 22, 17, 5
    dev, edge1030, NUM_MILD, 42, 31, 11
    sim, edge1030, NUM_MILD, 42, 32, 10
    dev, edge1030, NUM_HOT, 66, 49, 17
    sim, edge1030, NUM_HOT, 66, 50, 16
    dev, edge1030, NUM_THAI_HOT, 81, 61, 20
    sim, edge1030, NUM_THAI_HOT, 81, 62, 19

    , device, font, height, ascent, descent
    dev, edgeexplore, XTINY, 12, 9, 3
    sim, edgeexplore, XTINY, 12, 10, 2
    dev, edgeexplore, TINY, 17, 12, 5
    sim, edgeexplore, TINY, 17, 14, 3
    dev, edgeexplore, SMALL, 19, 14, 5
    sim, edgeexplore, SMALL, 19, 15, 4
    dev, edgeexplore, MEDIUM, 22, 16, 6
    sim, edgeexplore, MEDIUM, 22, 18, 4
    dev, edgeexplore, LARGE, 36, 26, 10
    sim, edgeexplore, LARGE, 36, 29, 7
    dev, edgeexplore, NUM_MEDIUM, 42, 31, 11
    sim, edgeexplore, NUM_MEDIUM, 42, 32, 10
    dev, edgeexplore, NUM_HOT, 56, 42, 14
    sim, edgeexplore, NUM_HOT, 56, 43, 13


    2- I'm a bit confused now. Can you confirm if the root cause of this problem is a font size/type issue between the sim and the real devices or if it's about text positioning (not related to font size/type)?

    On some devices it is just about font size mismatches. On other devices (particularly the edge family), they use a different font rendering pipeline from the simulator. I believe this *could* cause text to be positioned differently (Brian.ConnectIQ would have to confirm). If this does happen, it would be considered a ConnectIQ simulator bug.

  • With the help of Stephen.ConnectIQ, I was able to gather data for the 520. As I'd expect, the ascent/descent values are off.

    , device, font, height, ascent, descent
    dev, edge_520, XTINY,12,9,3
    sim, edge_520, XTINY,12,10,2
    dev, edge_520, TINY,17,12,5
    sim, edge_520, TINY,17,14,3
    dev, edge_520, SMALL,19,14,5
    sim, edge_520, SMALL,19,15,4
    dev, edge_520, MEDIUM,22,16,6
    sim, edge_520, MEDIUM,22,18,4
    dev, edge_520, LARGE,36,26,10
    sim, edge_520, LARGE,36,29,7
    dev, edge_520, NUM_MILD,34,25,9
    sim, edge_520, NUM_MILD,34,26,8
    dev, edge_520, NUM_MEDIUM,39,29,10
    sim, edge_520, NUM_MEDIUM,39,30,9
    dev, edge_520, NUM_THAI_HOT,56,42,14
    sim, edge_520, NUM_THAI_HOT,56,43,13
  • Thanks Travis.ConnectIQ it will be interesting to have Brian.ConnectIQ feedback about this as well. In my case I'm only working with Edge devices so far so I'm really interested in seeing this fixed.
  • Former Member
    Former Member over 5 years ago
    Travis is going to have better information for you than I do about the status of the issue; I can comment a little about what is going on here though. The font renderer our Edge devices use is not something we can run directly in our simulator, so it is probably impossible to get an exact match there. As seen with the updates that have gone through, we can get pretty close. Things should not be off by noticeable amounts, but you will want to make sure your text has at least a little bit of clearance from other elements to avoid problems. I assume there are plans to get all the devices updated to match as closely as possible.