Skip to content

Comments

reduce jar size by invisibly replacing fonts#202

Merged
Hubcapp merged 2 commits intoRSCPlus:masterfrom
Hubcapp:font-alternatives
Jul 13, 2025
Merged

reduce jar size by invisibly replacing fonts#202
Hubcapp merged 2 commits intoRSCPlus:masterfrom
Hubcapp:font-alternatives

Conversation

@Hubcapp
Copy link
Member

@Hubcapp Hubcapp commented May 26, 2024

This PR should remove about 2.7 MB from the final jar without changing the rendering of any fonts. It would still be possible to remove arial.ttf by fully embracing jf, but it's not really worth it.

I have not removed h12p or h20b because the savings are only 2.8 KB and it's kind of mean to do to them.

  • Times New Roman font was not used
  • Arial Bold was a duplicate of Helvetica-Bold (which is not actually Helvetica, it's Arial)
  • OpenSans-Bold & Regular were very nearly identical to Arial, and only used for non-native notification bubbles, so I've replaced them with Arial Bold & Regular.
  • The entire Symbola font was included, even though we only use 5 glyphs from it. I trimmed the font down to just a few glyphs that we use, plus a few that might possibly be useful for the queue window in the future. It has gone from 3.17 MB to just 15.6 KB.

Before & After Arial Bold was replaced with Helvetica-Bold (the map window is the only place this was used):
image

After image of non-native notification bubbles (very acceptable)
image

The glyphs I chose to include in the Symbola font (edited with Fontforge):
image
image

@Hubcapp Hubcapp merged commit 10418d2 into RSCPlus:master Jul 13, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant