Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert more character sets with plFontConverter. #1409

Merged
merged 5 commits into from
Jul 12, 2023

Conversation

Hoikas
Copy link
Member

@Hoikas Hoikas commented Jun 26, 2023

Previously, plFontConverter by default converted the first 255 glyphs that it could find. The user could increase or decrease that limit but not have any other control. This PR removes the character counter specification and instead hardwires certain unicode character sets of interest to be converted, namely Latin and Cyrillic (see H-uru/moul-assets#237). Additional character sets are trivial to add by modifying plFontTrueType.cpp. Useful future work might be allowing .p2f files to be compressed, but that currently seems like overkill.

As a bonus, this improves the conversion of monochrome fonts by pulling in @colincornaby's fixes for crunchy freetype monochrome fonts. Further, some ST::string goodness is added.

Hoikas added 5 commits July 10, 2023 18:58
Previously, the user was allowed to manually specify a number of
characters to convert. This is a bit of an odd choice and doesn't match
what the other (read: non-freetype) methods do (convert everything). We
probably don't want all of the glyphs in unicode fonts (for now), but we
do want the Latin and Cyrillic ones for sure.
This brings Colin's improvement for the freetype console font rendering
over to plFontConverter. The monochrome fonts should no longer be quite
so crunchy.
@Hoikas Hoikas force-pushed the font_convert_unicode branch from 9e9b6b6 to f80087e Compare July 10, 2023 22:58
@Hoikas Hoikas merged commit c1345b2 into H-uru:master Jul 12, 2023
@Hoikas Hoikas deleted the font_convert_unicode branch July 12, 2023 22:04
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.

3 participants