Skip to content

Make it easier to change the bundled font.#136

Open
mook wants to merge 1 commit intoAncurio:masterfrom
mook:bundled-font-config
Open

Make it easier to change the bundled font.#136
mook wants to merge 1 commit intoAncurio:masterfrom
mook:bundled-font-config

Conversation

@mook
Copy link
Contributor

@mook mook commented Oct 26, 2015

This makes it easier to play CJK games, since the embedded font must have the glyphs necessary to display the game text. This however does not change the default, so liberation is still used in the default setting. Because needing to have the file under assets/ is unusual, it's listed as an advanced configuration option.

The qmake portion is untested, but should hopefully not break the build.

See also #135

This makes it easier to play CJK games, since the embedded font must have
the glyphs necessary to display the game text.

The qmake portion is untested, but should hopefully not break the build.

See also Ancurio#135
@Ancurio
Copy link
Owner

Ancurio commented Oct 29, 2015

The qmake portion is untested, but should hopefully not break the build.

It unfortunately does. Now that `#include "liberation.ttf.xxd" isn't verbatim in the file anymore, qmake doesn't recognize it as a dependency and omits the Makefile entry to generate it.

I'll see how to get around that when I have a bit more time.

@mook
Copy link
Contributor Author

mook commented Oct 30, 2015

I don't feel very strongly about hardcoding the assets/ part, but forcing a .ttf extension feels wrong, since that is not the only type supported by SDL_ttf (and more types might be supported in the future).

SDL_ttf seems to not care about the file extension enough that it accepted msgothic.ttc renamed as msgothic.ttf :)

Perhaps a better way to go would be to support the default font name thing better, such that for Japanese games the empty string actually falls back to something useful? That of course needs my in-progress branch (not pushed yet) to use fontconfig to pick up system fonts... and I have no idea if that is compatible with Windows/OSX at all.

@Ancurio
Copy link
Owner

Ancurio commented Oct 30, 2015

SDL_ttf seems to not care about the file extension enough that it accepted msgothic.ttc renamed as msgothic.ttf :)

Right, SDL_ttf, like the other SDL support libs, doesn't actually need the extension, although it might look at it to guess which decoder to try first.
What I'm talking about is that a user having a file that doesn't have the ttf extension but is still supported by SDL_ttf, is forced to put a ".ttf" at the end for no reason.

Perhaps a better way to go would be to support the default font name thing better, such that for Japanese games the empty string actually falls back to something useful? That of course needs my in-progress branch (not pushed yet) to use fontconfig to pick up system fonts... and I have no idea if that is compatible with Windows/OSX at all.

This is really just a problem with RGSS1 games, because in 2 and up games already ship their font dependencies. So to play this type of game, you just add a font to the game folder and setup a fontSub for "Arial".

Using fontconfig is not really an option as it is Linux-only, while mkxp is a cross-platform project.

@mook mook mentioned this pull request Nov 3, 2015
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.

2 participants