TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    Fontsize and dpi scaling

    Scheduled Pinned Locked Moved Development
    37 Posts 5 Posters 10.6k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      butterw @Cernel
      last edited by

      @cernel This feature was added to Java a couple years back, so this affects all java programs with a GUI.

      The issue will not be obvious to new users, as all apps on Windows now typically handle high dpi.

      One solution could be to have a setting in Triplea to scale down the displayed graphical elements (in addition to the map and the units on it, which can already be scaled).

      ubernautU 1 Reply Last reply Reply Quote 0
      • ubernautU Offline
        ubernaut Lobby Moderators @butterw
        last edited by

        @butterw usually you could just take the system setting i think that's what most apps do

        "You should never have told me horses sleep standing up, it gave me a mental block." - Mister Ed

        B 1 Reply Last reply Reply Quote 0
        • B Offline
          butterw @ubernaut
          last edited by

          @ubernaut Windows System setting (above 100%) kinda works, at least in the main maps. But images (displayed at 125%) are blurry/ugly.

          ubernautU 1 Reply Last reply Reply Quote 0
          • ubernautU Offline
            ubernaut Lobby Moderators @butterw
            last edited by

            @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.

            "You should never have told me horses sleep standing up, it gave me a mental block." - Mister Ed

            B 1 Reply Last reply Reply Quote 0
            • B Offline
              butterw @ubernaut
              last edited by

              @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.

              C 1 Reply Last reply Reply Quote 0
              • C Offline
                Cernel Moderators Lobby Moderators @butterw
                last edited by

                @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).

                B 2 Replies Last reply Reply Quote 0
                • B Offline
                  butterw @Cernel
                  last edited by butterw

                  @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.
                  alt text

                  C 1 Reply Last reply Reply Quote 0
                  • C Offline
                    Cernel Moderators Lobby Moderators @butterw
                    last edited by

                    @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).

                    B 1 Reply Last reply Reply Quote 0
                    • C Offline
                      Cernel Moderators Lobby Moderators
                      last edited by

                      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).

                      B 1 Reply Last reply Reply Quote 0
                      • B Offline
                        butterw @Cernel
                        last edited by

                        @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.

                        TheDogT 1 Reply Last reply Reply Quote 0
                        • TheDogT Offline
                          TheDog @butterw
                          last edited by

                          @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.

                          https://forums.triplea-game.org/tags/thedog
                          https://forums.triplea-game.org/topic/3741/curated-best-top-maps-triplea-guides

                          B 1 Reply Last reply Reply Quote 0
                          • LaFayetteL Offline
                            LaFayette Admin
                            last edited by LaFayette

                            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.

                            LaFayetteL 1 Reply Last reply Reply Quote 0
                            • LaFayetteL Offline
                              LaFayette Admin @LaFayette
                              last edited by

                              Addendum, I'm not sure if 2.6 will even read notes from the XML file, so yeah, best to extract them : )

                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                butterw @TheDog
                                last edited by

                                @thedog

                                • 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.
                                1 Reply Last reply Reply Quote 0
                                • B Offline
                                  butterw
                                  last edited by butterw

                                  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.
                                  C 1 Reply Last reply Reply Quote 0
                                  • C Offline
                                    Cernel Moderators Lobby Moderators @butterw
                                    last edited by

                                    @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.).

                                    B 1 Reply Last reply Reply Quote 0
                                    • B Offline
                                      butterw @Cernel
                                      last edited by

                                      @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.

                                      1 Reply Last reply Reply Quote 0
                                      • LaFayetteL Offline
                                        LaFayette Admin
                                        last edited by

                                        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..

                                        B C 3 Replies Last reply Reply Quote 0
                                        • B Offline
                                          butterw @LaFayette
                                          last edited by

                                          @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.

                                          1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            Cernel Moderators Lobby Moderators @LaFayette
                                            last edited by

                                            @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.

                                            1 Reply Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums