MegaMek / megameklab

MegaMekLab is a BattleTech unit modification program. It allows creating and modifying all unit types available in MegaMek from Support Vehicles up to WarShips. It also allows printing record sheets for single or multiple units.
http://www.megamek.org
86 stars 132 forks source link

Incorrect font in certain places on exported to pdf record sheets #867

Closed Oatesy03 closed 3 years ago

Oatesy03 commented 3 years ago

Using MekLab standalone version 0.47.16, Windows 10, Java version 1.8.0_271.

King Crab KGC-000b test.pdf

When exporting to pdf, MekLab produces most of the record sheet in the font chosen in Configuration, but unfilled critical slots or those with non-critical components that fill crit slots seem to default to (I believe) Times New Roman, as do the range numbers underneath "Min, Short, Medium, Long".

I have reproduced this issue with several fonts, all of which are both installed on the computer and have been placed in ttf format in the data>fonts folder. It is not specific to this unit, and occurs with any Mech sheets I have tried. It does occur for Battle Armour, Protomech, and Vehicle record sheets, but only affects their range numbers.

I note that when attempting to choose a font from the Configuration menu without adding that font to the data>fonts folder, all text likewise appears as Times New Roman.

Having had a glance through the log file, nothing shows that appears relevant to this issue.

To further the mystery, I had initially (for about two record sheets) completely successful record sheet exports, with all text appearing in the desired font. All attempts since then have been as described above. The only change I am aware of was closing and reopening the software.

I have had no issues with fonts in the previous stable (0.46).

sixlettervariables commented 3 years ago

Can you try clearing your font cache and trying again?

https://github.com/MegaMek/megamek/wiki/Known-Issues-and-Workarounds#clearing-the-font-cache

sixlettervariables commented 3 years ago

Noticed this as well today from a headless export. Agrotera AGT-UA _Ariel_.mtf (1).pdf

Oatesy03 commented 3 years ago

Clearing the font cache appears to have worked, everything is coming out correctly. Cheers for the advice, if it pops up again the solution will be to periodically clear the cache I imagine.