Fonts unreadably small on high res monitors

Confirmed bugs should get a single post here. Check the READ ME FIRST sticky thread for the format.

Moderators: Azhrei, dorpond, trevor, giliath, jay, Mr.Ice, MapTool BugReport Manager

Forum rules
Posts that do not conform to the READ ME FIRST sticky thread are subject to deletion.
User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Fonts unreadably small on high res monitors

Post by Azhrei »

What happens if the manifest file is there and the system doesn't have a HiDPI monitor? I guess someone with a regular resolution monitor would need to test this.

I'm wondering if future builds should simply include this file until such time that the Java folks have some kind of solution worked out... Figuring out the directory to put it into could be a pain. (Hm, looks like JDK9 might already have this solved! It would be interesting to know if a Windows user running Java 9 could fire up MapTool and see what it looks like!)

One other option...

This page has some Java 8 code that looks through all entries in the Look&Feel and set the font size to 24. That code as written wouldn't work right if you have different sizes configured for different things in your L&F; we'd have to change it to multiply the existing size instead.

However, it might be an option for us. We could add a command line parameter that indicates whether or not to increase the size, probably something with yes/no/auto options. Then radio buttons added to the launcher would complete the process.

Raileth
Cave Troll
Posts: 28
Joined: Fri Oct 12, 2012 5:09 pm
Location: Camberley, UK

Re: Fonts unreadably small on high res monitors

Post by Raileth »

Don't forget that you still have to manually create the registry entry, so adding it to the install file without the registry entry shouldn't have an effect.
Raileth

User avatar
wolph42
Deity
Posts: 9706
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Fonts unreadably small on high res monitors

Post by wolph42 »

here you go. The reg file you need for the change. double click it to install.
for good measure I've added the manifest files as well.
The manifest files thus go in the directory where you find java.exe and javaw.exe
These you can find by
1. typing %appdata%\JWrapper-MapTool\ in the address bar of windows exploder.
2. then you type in the search box java.exe
3. on the result: right mouse click: open file location: there you put the manifest files.
Attachments
manifest.zip
(1.61 KiB) Downloaded 423 times

User avatar
lmarkus001
Great Wyrm
Posts: 1862
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Fonts unreadably small on high res monitors

Post by lmarkus001 »

AWESOME!

This is an even better solution than the theme tweak! My eyes thank you!

User avatar
wolph42
Deity
Posts: 9706
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Fonts unreadably small on high res monitors

Post by wolph42 »

@Azh. I think you can make this (=manifest files) part of the jwrapper install. They are 'dorment' as long as you don't run the reg file.

User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Fonts unreadably small on high res monitorsange

Post by Azhrei »

So if someone does the registry change and then wants to back it out, can you also create the opposite version that will delete it for them? We had (have?) something like that for the entries that MT currently uses to store preferences...

Since this is simply dropping files into a folder, I would think it should make it into the next gradle build. I'll need to get these checked in so that they can be merged to the main repo.


ryushinji
Kobold
Posts: 7
Joined: Mon Dec 05, 2016 1:50 am

Re: Fonts unreadably small on high res monitors

Post by ryushinji »

Alright, so I seem to be doing something WRONG.

I have placed the .manifest files in my standard JDK install (when I install Java, I do a synchronized JDK/JRE install), and that didn't work with both MT 1.4.0.5 and MT 1.4.1.7. I then grabbed the JWrapper version for amd64 (aka x64), ran the EXE, and then dropped the .manifest files into %appdata %\JWrapper-MapTool\JWrapper-Windows64JRE-00044487682-complete\bin, and that didn't work EITHER. Granted, I only did the JWrapper version for MT 1.4.1.7, so who knows.

OS is Win7 Pro SP1 x64. Standard JDK/JRE version is 8u112, obviously unimportant for JWrapper.

For those who commented on page 1, YES, the reason this is an issue is because no Swing Look&Feel themes support High DPI settings. However, JavaFX 8 DOES support High DPI settings (and I can attest to this as I've started converting my own Swing apps to JavaFX for this very reason).

If someone can let me know what is going on and what I'm doing wrong, that'd be awesome. I run the MT server for my group, so if I need to change MT versions, I can do so. For reference, screen in question is at a resolution of 3440x1440 and Win7's custom DPI is at 200%.

Thanks in advance for helping me figure out what's going on here.

Also, not sure if Swing will ever support High DPI settings. I can confirm that JavaFX as of 8u112 does however. The unfortunate thing is that there is no easy way to switch to JavaFX, so MT is kinda stuck using this workaround for now it seems.


ryushinji
Kobold
Posts: 7
Joined: Mon Dec 05, 2016 1:50 am

Re: Fonts unreadably small on high res monitors

Post by ryushinji »

wolph42 wrote:well the next dev version will have the manifest abd reg integrated. but for now, did youmrun the reg update?

The reg file I ran contained the following reg keys:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide]
"PreferExternalManifest"=dword:00000001

And no, after rerunning it about five seconds ago, still no luck for the JWrapper build.


User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Fonts unreadably small on high res monitors

Post by JamzTheMan »

Strange. Not sure what's going on then. I assume you tried a reboot as well? (for me, Windows 10, I don't need to reboot but dunno, maybe windows 7 is touchy?)

And assume "Disable display scaling on high DPI settings" is unchecked for the shortcut? And are you using the Start menu shortcuts from the windows menu? And assume the Launcher is still set to use the JWrapper JRE?

If you want to try my version, it's updated to Java 1.8_112 and manifest files are baked in.

If all else fails, do a Uninstall (Start Menu - MapTool -> Uninstall MapTool) and reinstall my version and give it a test (maptool.nerps.net) (note: to change the setting in the Launcher you have to run as admin, but you shouldn't even need to bother with this as you already ran the registry setting, so it should show as checked already)
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

ryushinji
Kobold
Posts: 7
Joined: Mon Dec 05, 2016 1:50 am

Re: Fonts unreadably small on high res monitors

Post by ryushinji »

@JamzTheMan: I honestly do not remember if a reboot occurred at some point. However, if the fix is Registry Key-specific, a reboot [i[shouldn't[/i] be required. (I use a Command Prompt Registry hack to have an equivalent to an 'automatic file' for CMD.exe, and that enables itself the instant the Registry key exists, for example.)

I don't typically use Start Menu, unless I'm using Start Search. In this instance, I was literally double-clicking on the executable inside Windows Explorer ((what's known as File Explorer in Win10).

I'll test out the custom build and see if that works.

Also, yeah, I obviously never disable DPI scaling, but thanks for making a point to ensure it wasn't checked.

(Side Note: Right now, I typically manually execute the JAR file via CMD.exe for 1.3.b91 due to Command Prompt being the easiest on my super-horrid eyes. If the custom MT defaults to the manifests, I hope I can just execute the JAR file like that...)

EDIT: Uninstalled, installed the custom build ( 1.4.3.8 ), rebooted, and still impossibly small fonts. I even did "Run as Administrator" on the EXE and double-checked the Registry key was enabled. Sigh. I honestly don't know what's up. I might try this on my Win10 box later tonight to make sure this isn't just Win7 being a pain (especially since this is an older install of Win7).

Thanks for the help.

EDIT 2: A thought occurred to me. Does the High DPI support also support Windows DPI scaling (as in Control Panel>Display)? I ask as that's the DPI support I really need.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Fonts unreadably small on high res monitors

Post by JamzTheMan »

Honestly not sure what's going on here. I don't have a Win7 box and haven't used one in a few years...

For Windows 10, the setting is now under Settings -> Customize your display -> Change the size of text, apps, and other items xxx% Windows has made changes with DPI settings in every version so far it seems, not sure if there is more than one place to change it in Win7?

As far as command prompt starting MT, technically, yes. It's still just a JAR. Obviously it would use whatever java you specify (vs jWrapper choosing it's own installed JRE) so you would have to control that yourself.

And the reason I asked re: startmenu, technically the .exe you download is just meant to be the "install". If you run it again, it does some checks and if nothing changed, it doesn't "reinstall" and shows you the popup window with icons for launcher/mt/tokentool. If you use the shortcuts created in the start menu, it launches the apps directly. It's only a small difference but one none-the-less.

At this point, I can only assume something special on your win7 machine may be interfering. Have you tried one of your other swing programs? (the manifest affects the JRE so any java launched using that JRE would be DPI aware). Let me know how your Windows 10 test goes...
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

ryushinji
Kobold
Posts: 7
Joined: Mon Dec 05, 2016 1:50 am

Re: Fonts unreadably small on high res monitors

Post by ryushinji »

So...I did the following on Win10 build 14393 (aka the "Anniversary Update"), in the listed order (apparently I can't figure out the BBCode for a numbered list):

  • Installed the reg key
  • Rebooted (Start > Power > Restart)
  • Installed Nerps Custom Maptool 1.4.3.8
  • Navigated to %appdata%\JWrapper-Maptool, and executed the EXE by right-clicking and then clicking "Run as Administrator".
  • Ensured the Reg key was enabled in the "Troubleshoot" menu.
  • Clicked "Launch Maptool" at bottom of launcher.

...and BAM! IT WORKS!!!!!! :D

So, yeah, looks like my Win7 PC has gotten (after 3 years and a new SSD...) to the point where something's mucked up somewhere. It could just be because my Win7 setup's been running for a year whereas the Win10 PC is almost brand-spanking new.

Either way, looks like my group's MT server will be using the custom MT build until RPTools' MT distro incorporates the manifests internally in the build.

Sincere apologies for all the complaining earlier and sincere thanks for building the manifests into a custom distro of MT.

Post Reply

Return to “Bug Reports”