Make it easier to change the bundled font. #136

Open
mook wants to merge 1 commits from mook/bundled-font-config into master
mook commented 2015-10-26 04:31:27 +00:00 (Migrated from github.com)

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. 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
Ancurio commented 2015-10-29 17:38:55 +00:00 (Migrated from github.com)

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.

> 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 commented 2015-10-30 03:58:40 +00:00 (Migrated from github.com)

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.

> 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](http://www.freedesktop.org/software/fontconfig/) to pick up system fonts... and I have no idea if that is compatible with Windows/OSX at all.
Ancurio commented 2015-10-30 09:53:16 +00:00 (Migrated from github.com)

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.

> 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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b mook/bundled-font-config master
git pull origin mook/bundled-font-config

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff mook/bundled-font-config
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#136
No description provided.