Fontsize and dpi scaling
-
@butterw usually you could just take the system setting i think that's what most apps do
-
@ubernaut Windows System setting (above 100%) kinda works, at least in the main maps. But images (displayed at 125%) are blurry/ugly.
-
@butterw my understanding is that the code needs to be updated and that there needs to be an assumption of a certain version of java for this to work.
-
@ubernaut Older versions of the program likely didn't do this.
But current java version in v2.5/2.6 is java11. On Windows, the required Java Runtime is bundled with Triplea, so by default it affects anyone using at least these versions.
-
@butterw Most users will never figure out anything of this. If they have any scaling setting, they'll just get badly looking blurred TripleA maps and simply think that TripleA maps are that bad.
If it is feasible, the program should always enforce a pixel-per-pixel rendering as default (assuming vectorial graphic will never be supported).
-
@cernel said in Fontsize and dpi scaling:
@butterw Most users will never figure out anything of this. If they have any scaling setting, they'll just get badly looking blurred TripleA maps and simply think that TripleA maps are that bad.
If it is feasible, the program should always enforce a pixel-per-pixel rendering as default (assuming vectorial graphic will never be supported).
Disabling the default dpi scaling is possible, the issue is that it will lead to small text.
In this Substance statusbar example, I've overriden system dpi in code to avoid the blurry image scaling and I've increased the Font size of Labels. The original font size can be seen on the titles.

-
@butterw said in Fontsize and dpi scaling:
@cernel said in Fontsize and dpi scaling:
@butterw Most users will never figure out anything of this. If they have any scaling setting, they'll just get badly looking blurred TripleA maps and simply think that TripleA maps are that bad.
If it is feasible, the program should always enforce a pixel-per-pixel rendering as default (assuming vectorial graphic will never be supported).
Disabling the default dpi scaling is possible,
I strongly suggest it to be done, then.
the issue is that it will lead to small text.
Nowhere as much as a problem as bad looking (blurry) graphic. By the way, I believe the default units stack numbers size (12) is way too small. The other problem is that it is not map-customizable. I keep it at 24 in my "270BC Wars" game and I would like to be able to set at this value as default for everyone.
Also, it would be good to be able to zoom in and out the game notes. In my "270BC Wars" I set the text size of the game notes much bigger than the default (almost every other game uses).
-
The problem is actually acute the most for cursors (I mean the maps each featuring a cursor image, like "Civil War"). Since I believe currently only "GIF" is supported for cursor images, rendering it non pixel-per-pixel gives very bad results there.
Try to open a map featuring a cursor image while having a higher than 100% scaling setting: the cursor will look very badly drawn.
In this case, there is also the problem that if you have set the cursor focus somewhere else than the default coordinates (double zero), the cursor image is scaled but not the focal point, which thereby goes out of place with respect to the drawing of the image (for example, if you have a cursor image in the shape of a sight).
-
@cernel It's quite obvious that dpi scaling needs to be turned off for some maps, even if it means small text. For maps such as ww2_v it is less critical, though the issue is still present. You are correct when stating that players who use high dpi will just think the map (or triplea) is buggy.
I don't think there is a solution that will work across all OS/Look&Feels (other than providing an option to disable dpi scaling). Players need to be aware that turning off dpi scaling can help.
the Font size for Unit counts could be bigger.
I don't know what the plan is for notes in v2.6, but the Notes tab has been removed. Using a web browser to view the now separate .notes.html file would probably be the best option. At least the notes are now guaranteed to be readable. Notes file can be designed so that they will display better in game and the in game display could be improved.
-
@butterw
For Notes, another alternative that works in 2.6 in my 3 maps I use a Game_Notes.png image that is called by the xml. -
FWIW, the notes are still available from the menu bar. Whether as an image or HTML, it is encouraged that the notes contents be extracted to a notes file. Hopefully it's obvious why having a notes file is nicer than inling HTML into XML.
-
Addendum, I'm not sure if 2.6 will even read notes from the XML file, so yeah, best to extract them : )
-
- The dpi upscaling leads to a poor quality result with images in Triplea.
- It's possible to write html that will display fine in Triplea, the 3 things to consider are font size, use of headings and background color.
- The html viewer could be fixed so that basic html notes are readable with default (Dark) Look and Feel, and with high dpi. This is the best option.
- With v2.6 external html notes files, an open game Notes in browser menu command could be added.
- The internal notes display can't handle css, just simple html.
-
GameNotes in v2.6
In v2.6 .notes.html is an external file in the /Games Folder of the map.
- GameNotesMenu.java specifies a max window size of 800x600
- The notes Panel has been removed, this also removes the Ctrl+N hotkey.
- It sets the Text color to black: this makes basic notes unreadable with dark look and feels !!!
- Currently loading Game Notes in the default web browser doesn't load the images, because a relative path isn't specified for them.
-
@butterw The current HTML rendering should remain the main option though. I can say that for me the web broswer renders the HTML wrongly (beside not having the images), or at least differently.
By the way, are you aware of the issue that TripleA renders every dimension defined in the HTML of Notes 30% bigger (For example, if you define 100 pixels for a cell wideness, TripleA shows it at 130 pixels, instead.).
-
@cernel
Most maps only have basic notes. These notes need to be easy to write and need to display well in the Internal viewer.Map-makers should also have the option of using modern html not supported by the internal viewer going forward.
-
FWIW, in 2.6 the game notes are live loaded from file whenever viewed, so you can edit them more easily that way. Plus you no longer have to XML escape the HTML either, so overall good.
We should get the black text issue. @butterw , could you look into that?
@Cernel the 30% is odd, it's never been tracked down, but it's nothing we introduced, we use the JDK rendering of HTML and don't mess with the styling further.
Good point on the images, the way the images are localized is completely obtuse and I should have figured it would not work well when viewed in a web browser. Oh well..
-
@lafayette
Forced Black foreground is easy to remove and does improve things with dark look and feels. But the result is still most readable when you select (invert) the text.
When nothing is coded in the html, forcing both dark text AND a light background might be preferable independently of look and feel. Without the Notes panel I think this becomes a realistic option.A font size preference for Notes, would help with small text issues which can result from disabling dpi scaling.
-
@lafayette Maybe there were plans to move the game notes outside of the game file (just like recently done) but inside the "doc" folder.
Actually, I've no idea why to have the notes in the "games" folder instead of in the "doc" folder.
-
@lafayette
The issue is that there seems to be limited control over rendering both in the html and the code.- The reason the foreground is forced to black in code is because some maps set background color to white in html, and by default the text displays as grey in this case. Setting foreground color in html doesn't help.
- As I mentionned this causes unreadable text with dark look and feel if background color isn't set in the html.
- The map I tested also sets font size to 12 in html, this doesn't display well in an external web-browser.
This has probably all been discussed previously, the problem is that the current approach doesn't work and I'm not sure what the solution is.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login