MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
295 stars 283 forks source link

[50.0.0-SNAPSHOT] Problems loading Noto Sans font on Linux #5848

Closed mhjacks closed 1 month ago

mhjacks commented 1 month ago

Environment

17:44:24,157 INFO  [megamek.MegaMek] {main}
megamek.MegaMek.initializeLogging(MegaMek.java:143) - Starting MegaMek v0.50.0-SNAPSHOT
    Build Date: 2024-08-03T01:16:41.243976560
    Today: 2024-08-03
    Origin Project: MegaMek
    Java Vendor: Red Hat, Inc.
    Java Version: 17.0.12
    Platform: Linux 6.9.12-200.fc40.x86_64 (amd64)
    System Locale: en_US
    Total memory available to MegaMek: 4 GB
    MM Code Revision: 71bd1ef7166a07f477da27334ae77fc15acd42b7
    MML Code Revision: 35aa5ce66ca59272c0d1e05c3d174cd4c0335b3c
    MHQ Code Revision: 76e9cea125956ab9a9d8af389ee60c2bb2eca81d

(The last nightly available)

Description

Logs throw warnings about being able to load Noto Sans fonts, and it is seemingly not used as the game's default font:

17:44:24,275 WARN  [megamek.client.ui.swing.util.FontHandler] {main}
megamek.client.ui.swing.util.FontHandler.parseFontsInDirectory(FontHandler.java:153) - Could not register some fonts
    Failed to register font data/fonts/Noto Sans/NotoSans-Italic.ttf
    Failed to register font data/fonts/Noto Sans/NotoSans-Bold.ttf
    Failed to register font data/fonts/Noto Sans/NotoSans-BoldItalic.ttf
    Failed to register font data/fonts/Noto Sans/NotoSans-Regular.ttf

Noto Sans is still a selectable font in the Summary tab in the Unit Selector.

By default, no font is shown in the Font selector: image

This is what it looks like when Noto Sans is chosen: image

repligator commented 1 month ago

Linux Java 17 49.19 Slightly different error, but same symptoms. Default is empty, Noto Sans appears identical to default when selected. Screenshot_20240803_185235 megamek.log

Linux Java 17 50.00 Snapshot megamek(1).log