Under Review
over 1 year ago

Users complain of very small text in simple data fields

Original thread: https://forums.garmin.com/developer/connect-iq/f/discussion/259355/users-complain-of-very-small-text-in-simple-data-fields

Although I can't personally recreate this problem, I am reposting it here for visibility, as multiple users have complained of this issue, for multiple simple data field apps.

Text of original post:


Is this happening to anyone else? At first it was only happening for one of my simple data field apps, so I thought it was an isolated incident.

Now a user of a 2nd simple data field app has made the same complaint. Some users report that they used to see normal-sized text, and one day it suddenly became small. More recently, some new users say that it's always been small.

In one case I'm only displaying characters available in number fonts (for simple data fields *) such as digits, ".", ":", and "-" (verified in the simulator). (* I'm aware that simple data fields may be slightly more restrictive than necessary when it comes to which characters it will display in numerical fonts. i.e. The set of available characters for number fonts may be bigger in some cases than the set of characters that a simple data field will render in a number font). Even in this case, I've asked an affected user to change the settings so that only digits are displayed, and the problem persists.

In the other case I'm only displaying digits.

And I can't recreate this in the simulator or on my real 935 device.

What I see on my watch (normal-sized text):

https://ibb.co/1QC0c5V

What they see on their watch (text that's too small):

https://ibb.co/sFCYvvY

It's not limited to one device as Vivoactive 4 and Edge 530 users have both complained.

The two apps in question are:

https://apps.garmin.com/en-US/apps/fd690281-9c22-4fee-a81e-3b7f39aa67c5

https://apps.garmin.com/en-US/apps/2bc8b0c1-dd83-4679-96f1-0ae2a0925920

The latter (Total Ascent) literally does nothing but convert ActivityInfo.totalAscent to the user's preferred units and round it to a whole number.

using Toybox.WatchUi;

class totalAscentView extends WatchUi.SimpleDataField {

	var elevationUnits;
	function getUnits()
	{
		var settings = System.getDeviceSettings();
		elevationUnits = settings.elevationUnits;
	}

	// m to feet
	private function convertAltitude(value)
	{
		if (value == null)
		{
			return null;
		}
		
		if (elevationUnits == System.UNIT_STATUTE)
		{
			value = value / 0.3048;
		}
		return value;
	}		


    function initialize() {
        SimpleDataField.initialize();
        label = "Ascent";
    }

    function compute(info) {
    	getUnits();
        
        var val = convertAltitude(info.totalAscent);
        if (val == null)
        {
        	return 0;
        }
        
        return Math.round(val).toNumber();
    }
}

Parents
  • My brand new Edge 130 Plus renders any string that the SimpleDatafield.compute function returns (for instance, 42.format("%.1f")) in a small font, and Number or Float values in the "native" font for the field size.

    My 945 LTE does this too. I think CIQ used to (e.g. for 935) try to automatically determine if a String returned by simple data field could be displayed in a number font based on the string's contents. This would be convenient for displaying the degree symbol, for example, as it's available in number fonts but can't be represented in a Number or Float (obviously). Even then, there was a bug/limitation that returning a space character inside of a string would cause a non-number font to be used, even though the space character is available in number fonts for most devices

    I think now CIQ just does what you (@zweistein) said, which is automatically use non-number fonts for String values, and number fonts for Number/Float values.

    Seems like a step backwards. The workaround in some cases would be to just return a Number/Float, but that falls apart if you want full control over the number of decimal places displayed, or to display other characters such as "+", "#", "%" or the degree sign, which are available in number fonts (at least for some devices.)

    A more comprehensive workaround would be to implement a complex data field instead, but that's a bit more work and may not be feasible for data fields which need to support old devices, since there may not be enough memory for the additional code.

Comment
  • My brand new Edge 130 Plus renders any string that the SimpleDatafield.compute function returns (for instance, 42.format("%.1f")) in a small font, and Number or Float values in the "native" font for the field size.

    My 945 LTE does this too. I think CIQ used to (e.g. for 935) try to automatically determine if a String returned by simple data field could be displayed in a number font based on the string's contents. This would be convenient for displaying the degree symbol, for example, as it's available in number fonts but can't be represented in a Number or Float (obviously). Even then, there was a bug/limitation that returning a space character inside of a string would cause a non-number font to be used, even though the space character is available in number fonts for most devices

    I think now CIQ just does what you (@zweistein) said, which is automatically use non-number fonts for String values, and number fonts for Number/Float values.

    Seems like a step backwards. The workaround in some cases would be to just return a Number/Float, but that falls apart if you want full control over the number of decimal places displayed, or to display other characters such as "+", "#", "%" or the degree sign, which are available in number fonts (at least for some devices.)

    A more comprehensive workaround would be to implement a complex data field instead, but that's a bit more work and may not be feasible for data fields which need to support old devices, since there may not be enough memory for the additional code.

Children
No Data