Game notes max width
-
@LaFayette I've tried in several other cases, also on otherwise completely blank or next to blank notes, as per screenshots at this thread, and it still gives 30% more pixels. Look at this:
https://forums.triplea-game.org/topic/1784/game-notes-max-width/6?page=1 -
@Cernel Give it a try as a web-page. The swing rendering should not be too different, if you can't get it to work there, it's pretty guaranteed swing won't do any better.
-
-
Save the HTML content as a ".html" file and open it in a web browser.
-
@LaFayette said in Game notes max width:
@Cernel Give it a try as a web-page. The swing rendering should not be too different, if you can't get it to work there, it's pretty guaranteed swing won't do any better.
Ok here it is what I get on a html file with this code:
<html> <body> <table width="1000px" border="1px"> <tr> <th>AAA</th> <th>BBB</th> </tr> <tr> <td>aaa</td> <td>bbb</td> </tr> </table> </body> </html>Screenshot:

It's fully correct. So, does this prove the problem (getting 130% the pixels you ask for) is not with my system, but with TripleA?
-
We're using Swing HTML rendering, we literally can't fix it and have not coded anything to alter or manage it. The fix needs to be in crafting the HTML that renders properly in that HTML rendering engine.
-
Correct rendering in a webpage is necessary but not sufficient criteria for having it render well in the Swing HTML renderer. Said another way, if it does not work on a vanilla webpage, it certainly won't work in Swing. But even if it renders well on a modern browser, the Swing HTML renderer does not guarantee to be compliant, is old, and has no guarantee it'll do anything really correctly.
-
Well, in my opinion this is a pretty major issue TripleA is going to go along with, as mapmakers will keep formatting notes likely inherently wrong, with respect to their intentions (like @Frostion), over the years, and new mapmakers will have to find out that they are getting 30% more pixel than they wanted, so I suggest at least tracking this somewhere.
-
Tracking is for things we can fix and do something about. The problem is in the HTML and the HTML renderer, neither of which is controlled by the game engine proper.
-
Ok, anyway, if anybody is curious about this problem that, apparently, will never be possibly fixed, you can install this map:
0.zipThen, starting it, if you see what I see, you should see a table of 130 pixels wideness, while, opening the xml, you can see this is the code of the notes property:
<property name="notes"> <string/> <value><![CDATA[ <html> <body> <table style="width:100px;background-color:FFFFFF"> <tr> <th>a</th> <th>b</th> </tr> <tr> <td>c</td> <td>d</td> </tr> </table> </body> </html> ]]></value> </property>The map works both on 1.9 and 2.0.
If you believe the wideness of the table in notes is given as 100 pixels (as it should), please upload a screenshot of it.
-
Issue tracked in:
https://github.com/triplea-game/triplea/issues/6157 -
@Cernel the HTML needs to be fixed within the constraints of the HTML rendering. There is no code fix for us to apply here. We're not modifying the HTML, we're not rendering it ourselves. There is no way we're going to change anything (short of rebuilding an HTML renderer, IE; a web-browser) that makes this exact HTML render how you want.
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