clash with font renderer and server messages?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
High
|
Unassigned |
Bug Description
I was playing bzr8770[trunk] and when conecting to the metaserver I get:
Error rendering richtext: Syntax error at 1:385: expected an allowed tag, got '/p'. String continues with: '</p><p font-face=
Welcome on the Widelands Metase'. Text is:
<rt><p><font color=33ff33 size=9>[07:28] </font><font size=14 face=serif color=999999 bold=1>*** Server time offset is 0 seconds.
Welcome on the Widelands Metaserver
<br>
</p><p font-face=FreeSerif font-color=CCCCFF font-size=14>
* Our forums can be found at http://
<br>
* Please report bugs at https:/
This text is also visible on the lobby screen.
Some other branch bzr8757[bug-1619402-port-work-
R19 sems unaffected.
* I assume the server messages are encoded for the old font renderer (which we need for R19 and even r18 for quite a while)
* OTHO this message looks strange to a normal player.
I assume we should implement different welcome messages on the server now:
* <= r18 plain text: "your version is outdated, it may still work ..."
* >= r20 new font renderer
* else (== r19) keep current message
Related branches
- GunChleoc: Approve
-
Diff: 105 lines (+7/-50)3 files modifiedsrc/network/internet_gaming.cc (+6/-1)
src/wui/chat_msg_layout.cc (+1/-47)
src/wui/chat_msg_layout.h (+0/-2)
Changed in widelands: | |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Fix Committed |
assignee: | Notabilis (notabilis27) → nobody |
Your analysis is correct - it's encoded for the old renderer. The new renderer needs to look like this:
<p><font color=CCCCFF size=14>text text </font></p>
We should definitely lose the font face, because it will mess up translations if we ever decide to translate these messages.
Maybe even lose the font tags completely, because that should be defined by the UI and not by the server? And a bigger header is not really needed. Both renderers can handle a simple <p>text text</p> without parameters.