Fonts on UWP app on Windows 10 Desktop terrible

53 views
Skip to first unread message

Bryan Buchanan

unread,
Sep 18, 2016, 1:36:47 AM9/18/16
to CodenameOne Discussions
Just put an app on the Windows App store, and I didn't specify just WP10, so it is available for desktop too.

Attached are 3 screen shots from the phone, and 3 from desktop. The fonts (which are an included TTF file), as well as the default hamburger and overflow menu icons are not scaled correctly. Is this something I need to fix, or should it "just work" across device form factors ? (I set the font size in mm, so I guess it may be my problem ?).
wp_ss_20160912_0003.png
wp_ss_20160912_0002.png
wp_ss_20160912_0001.png
Screenshot (3).png
Screenshot (2).png
Screenshot (1).png

Steve Hannah

unread,
Sep 18, 2016, 1:47:16 AM9/18/16
to codenameone...@googlegroups.com
There may be an issue with the UWP port's mm to pixel conversion settings.  I've noticed some ttf fonts looking a little small on my tests but nothing as pronounced as the screenshots you just posted.

I'll take a look this week and see if I can track it down.

On Saturday, 17 September 2016, Bryan Buchanan <bry...@webbtide.com> wrote:
Just put an app on the Windows App store, and I didn't specify just WP10, so it is available for desktop too.

Attached are 3 screen shots from the phone, and 3 from desktop. The fonts (which are an included TTF file), as well as the default hamburger and overflow menu icons are not scaled correctly. Is this something I need to fix, or should it "just work" across device form factors ? (I set the font size in mm, so I guess it may be my problem ?).

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/261a34e4-fc40-4b98-817d-c3b2cff8ece7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Steve Hannah
Software Developer
Codename One

Steve Hannah

unread,
Sep 19, 2016, 12:39:50 PM9/19/16
to codenameone...@googlegroups.com
Out of curiosity, what are your resolution settings on that machine?  And do you have anything set for DPI scaling?

Steve

On Sat, Sep 17, 2016 at 10:47 PM, Steve Hannah <steve....@codenameone.com> wrote:
There may be an issue with the UWP port's mm to pixel conversion settings.  I've noticed some ttf fonts looking a little small on my tests but nothing as pronounced as the screenshots you just posted.

I'll take a look this week and see if I can track it down.

On Saturday, 17 September 2016, Bryan Buchanan <bry...@webbtide.com> wrote:
Just put an app on the Windows App store, and I didn't specify just WP10, so it is available for desktop too.

Attached are 3 screen shots from the phone, and 3 from desktop. The fonts (which are an included TTF file), as well as the default hamburger and overflow menu icons are not scaled correctly. Is this something I need to fix, or should it "just work" across device form factors ? (I set the font size in mm, so I guess it may be my problem ?).

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com.
--
Steve Hannah
Software Developer
Codename One

Steve Hannah

unread,
Sep 19, 2016, 1:49:53 PM9/19/16
to codenameone...@googlegroups.com
Also, Are you using the computer directly, or are you remoting in through Microsoft Remote Desktop?

Bryan Buchanan

unread,
Sep 19, 2016, 5:56:54 PM9/19/16
to CodenameOne Discussions

1360x768, DPI set to 100% (default).

It's an Intel Compute Stick plugged in to the HDMI port of an LG TV.

Steve Hannah

unread,
Sep 19, 2016, 6:04:26 PM9/19/16
to codenameone...@googlegroups.com
Had to Google to see what the compute stick was.  Looks very cool!

I have been digging into the UWP mmToPixel conversion today and everything looks like it's in order.   If anything, it might actually be the most accurate of any of the platforms for the conversion - and this could be the issue.  If this is on a television, then a millimetre sizing may actually produce text that is too small.  E.g. 2.5mm on a monitor is fine.  On a television, you wouldn't be able to see it at all because you'd typically be sitting back too far.

I'll add some display properties that you can read to get the display information at runtime.  That might help you to track down the issue - or, might help me to improve things if you can provide this information to me.

Best regards

Steve

On Mon, Sep 19, 2016 at 2:56 PM, Bryan Buchanan <bry...@webbtide.com> wrote:

1360x768, DPI set to 100% (default).

It's an Intel Compute Stick plugged in to the HDMI port of an LG TV.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Steve Hannah

unread,
Sep 19, 2016, 7:03:35 PM9/19/16
to codenameone...@googlegroups.com
Starting with the next build server update (Friday) the following windows-specific display properties will be accessible:

// Excerpt from test.. you may want to just add them to some labels to see the values in your UI... or use Log.sendLog()
// to send these results to you.
Display d = Display.getInstance();
        Log.p("Logical DPI: "+ d.getProperty("windows.DisplayInformation.LogicalDpi", "Unknown"));
        Log.p("Diagonal Size in Inches: "+ d.getProperty("windows.DisplayInformation.DiagonalSizeInInches", "Unknown"));
        Log.p("Logical Raw DPI X: "+ d.getProperty("windows.DisplayInformation.RawDpiX", "Unknown"));
        Log.p("Logical Raw DPI Y: "+ d.getProperty("windows.DisplayInformation.RawDpiY", "Unknown"));
        Log.p("Logical Raw Pixels Per View Pixel: "+ d.getProperty("windows.DisplayInformation.RawPixelsPerViewPixel", "Unknown"));
        Log.p("Logical Resolution Scale: "+ d.getProperty("windows.DisplayInformation.ResolutionScale", "Unknown"));



These values may help us determine why your fonts appear small.

Steve

On Mon, Sep 19, 2016 at 3:04 PM, Steve Hannah <steve....@codenameone.com> wrote:
Had to Google to see what the compute stick was.  Looks very cool!

I have been digging into the UWP mmToPixel conversion today and everything looks like it's in order.   If anything, it might actually be the most accurate of any of the platforms for the conversion - and this could be the issue.  If this is on a television, then a millimetre sizing may actually produce text that is too small.  E.g. 2.5mm on a monitor is fine.  On a television, you wouldn't be able to see it at all because you'd typically be sitting back too far.

I'll add some display properties that you can read to get the display information at runtime.  That might help you to track down the issue - or, might help me to improve things if you can provide this information to me.

Best regards

Steve
On Mon, Sep 19, 2016 at 2:56 PM, Bryan Buchanan <bry...@webbtide.com> wrote:

1360x768, DPI set to 100% (default).

It's an Intel Compute Stick plugged in to the HDMI port of an LG TV.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsubscr...@googlegroups.com.
--
Steve Hannah
Software Developer
Codename One

Bryan Buchanan

unread,
Sep 20, 2016, 4:01:46 AM9/20/16
to CodenameOne Discussions
OK - I'll run up something on the weekend to get you some values.

Bryan Buchanan

unread,
Sep 24, 2016, 3:16:27 AM9/24/16
to CodenameOne Discussions
Attached is:

1. program used for testing. Note that

            Display.getInstance().sendMessage(new String[]{"bry...@webbtide.com"}, "Device Details", msg);

doesn't seem to work on either the mobile or desktop

2. wp_ss_* are from a Lumia 640. Note the pixel size of the bold labels is 3mm

3. Screenshot (7) is the same app running on the dektop

4. changed BoldLabel to have 30mm size - see Screenshot of theme editor

5. Screenshot (9) shows app with 30mm bold labels (This just shows the Windows specific settings).

Hope this helps.
DeviceTester.java
Screenshot (9).png
wp_ss_20160924_0001.png
wp_ss_20160924_0002.png
wp_ss_20160924_0003.png
wp_ss_20160924_0004.png
wp_ss_20160924_0005.png
wp_ss_20160924_0006.png
Screenshot (7).png
Screenshot - 240916 - 17:06:16.png

Bryan Buchanan

unread,
Oct 8, 2016, 4:04:48 PM10/8/16
to CodenameOne Discussions
Just wondering of anything has been done about this ?

Steve Hannah

unread,
Oct 8, 2016, 4:17:49 PM10/8/16
to codenameone...@googlegroups.com
On your large screen are you sure that millimetres aren't just very small relative to the screen size?  The UWP port is pretty exact about mm sizing.  Eg hooking up. Tv screen to a windows box is not the same as mirroring and android to a tv.  In the android case of mirroring the millimetres are calculated against the device screen.  In the windows case it is calculating against the tv screen.

Steve
--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Bryan Buchanan

unread,
Oct 8, 2016, 8:56:11 PM10/8/16
to CodenameOne Discussions
If I use the generic TTF sizing of "Medium" it displays fine, so I think you are correct. I need to re-think my logic on setting font sizes.
Reply all
Reply to author
Forward
0 new messages