Ticket #44906

Qt: Wrong font (size) on current production widget

오픈 날짜: 2022-06-22 20:11 마지막 업데이트: 2022-07-07 23:46

Reporter:
소유자:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
2

Details

Even with #44389 patch applied, ddeanbrown reports that the font is not right:

"Applying the patch did not have any affect."

That's on MacOS, where Qt often seems to have behavior different from other platforms (not only bugs - there's even documented differences)

Ticket History (3/12 Histories)

2022-06-22 20:11 Updated by: cazfi
  • New Ticket "Qt: Wrong font (size) on current production widget" created
2022-06-26 00:31 Updated by: cazfi
댓글 올리기

Attached patch that would produce some logging for debugging purposes - not meant to ever become part of freeciv distribution. For S3_0.

It would be great if ddeanbrown or someone else able to reproduce the problem could get the logs from a run with this patch applied. Launch the client, Start a New Game, W)ait with all the other units until Settlers activate, and then build a city with it (to get a city dialog opened), close the client.

2022-06-26 00:39 Updated by: cazfi
댓글 올리기

Example output of what I got with 'gui_qt_font_default="Liberation Sans,15,-1,5,50,0,0,0,0,0"' in ~/.freeciv/freeciv-client-rc-3.0

---

Running ./client/freeciv-qt
Encodings: Data=UTF-8, Local=UTF-8, Internal=UTF-8
2: gui_qt_font_default : Liberation Sans,15,-1,5,50,0,0,0,0,0.
2: gui_qt_font_chatline : Liberation Mono,13,-1,5,50,0,0,0,0,0.
2: gui_qt_font_city_names : Liberation Sans,11,-1,5,75,0,0,0,0,0.
2: gui_qt_font_city_productions : Noto Sans,13,-1,5,75,0,0,0,0,0.
2: gui_qt_font_reqtree_text : Noto Sans,15,-1,5,75,0,0,0,0,0.
2: App default after change callbacks : Liberation Sans,15,-1,5,50,0,0,0,0,0.
2: Loading tileset "hexemplio".
2: Loading tileset "hexemplio".
2: Drawing font for progress bar : Liberation Sans,15,-1,5,50,0,0,0,0,0.
2: Production combo itself : Liberation Sans,15,-1,5,50,0,0,0,0,0.
2: Production combo uses : Liberation Sans,15,-1,5,50,0,0,0,0,0.
2: Progress bar painter : Liberation Sans,15,-1,5,75,0,0,0,0,0.
2: last message repeated 2 times

2022-06-26 04:38 Updated by: ddeanbrown
댓글 올리기
(This comment has been deleted)
2022-06-26 04:42 Updated by: ddeanbrown
댓글 올리기

Here's log from my Mac with the patch -


Could not create pixmap from /Applications/freeciv.app/Contents/share/freeciv/themes/gui-qt/Classic/pattern-game.jpg
2: gui_qt_font_default : Arial,14,-1,5,50,0,0,0,0,0,Regular.
2: gui_qt_font_chatline : .AppleSystemUIFont,10,-1,5,50,0,0,0,0,0,Regular.
2: gui_qt_font_city_names : Gill Sans,18,-1,5,50,0,0,0,0,0,Regular.
2: gui_qt_font_city_productions : Sans Serif,10,-1,5,50,1,0,0,0,0,Regular.
2: gui_qt_font_reqtree_text : Sans Serif,10,-1,5,50,1,0,0,0,0,Regular.
2: App default after change callbacks : Arial,14,-1,5,50,0,0,0,0,0,Regular.
2: Loading tileset "hexemplio".
2: Loading tileset "amplio2".
2: Drawing font for progress bar : Arial,14,-1,5,50,0,0,0,0,0,Regular.
2: Production combo itself : Arial,14,-1,5,50,0,0,0,0,0,Regular.
2: Production combo uses : Arial,14,-1,5,50,0,0,0,0,0,Regular.
2: Progress bar painter : Arial,14,-1,5,75,0,0,0,0,0,Regular.
2: Painter adjusted : Arial,8,-1,5,75,0,0,0,0,0,Regular.
2: Progress bar painter : Arial,8,-1,5,75,0,0,0,0,0,Regular.
2: last message repeated 2 times
2: last message repeated 2 times (total 4 repeats)

2022-06-26 04:45 Updated by: cazfi
댓글 올리기

Reply To ddeanbrown

2: gui_qt_font_default : Arial,14,-1,5,50,0,0,0,0,0,Regular.

...

2: Progress bar painter : Arial,14,-1,5,75,0,0,0,0,0,Regular. 2: Painter adjusted : Arial,8,-1,5,75,0,0,0,0,0,Regular.

So, it's the adjustment done for the painter that makes the font smaller (14 -> 8). I already were looking at it for another problem in it.

2022-06-26 05:57 Updated by: cazfi
댓글 올리기

Reply To cazfi

I already were looking at it for another problem in it.

Patch attached. See the commit message on top of it for details. It should make the adjustment to work more "right", but there's no guarantee that even right adjustment would be working well.

2022-06-26 13:11 Updated by: ddeanbrown
댓글 올리기

New patch produces much better appearance. Still see the bug #44850 but that's a separate issue.

2022-07-05 00:16 Updated by: cazfi
  • 소유자 Update from (None) to cazfi
  • Resolution Update from None to Accepted
  • Milestone Update from (None) to 3.0.3 (closed)
2022-07-07 23:46 Updated by: cazfi
  • Status Update from Open to Closed
  • Resolution Update from Accepted to Fixed

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login