待辦事項 #44906

Qt: Wrong font (size) on current production widget

啟用日期: 2022-06-22 20:11 最後更新: 2022-07-07 23:46

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
修正
檔案:
2

細節

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 (無) to cazfi
  • 處理結果 Update from to Accepted
  • 里程碑 Update from (無) to 3.0.3 (closed)
2022-07-07 23:46 Updated by: cazfi
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from Accepted to 修正

編輯

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