-
Notifications
You must be signed in to change notification settings - Fork 182
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
Font fallback mechanism #24
Comments
We could use fontconfig font stack for UNIX systems (OSX included I believe). I don't know about Win32 fallback mechanism. Fixed fonts should be preferable. No needed for other platforms without font stock available. |
WinAPI information: Fontconfig information: |
I'll try with the FontConfig part |
Is there a standard way under Linux to access the font folder? Maybe add some extra logic too: |
Yes, but fonts are in subfolders and FileFinder need more deeper scanning because paths are diferent on every distro. There are two approaches, the ugly (plain FileFinder) and the good (FontConfig): The ugly: Using de facto paths for most distros with FileFinder. Path stack example:
However, there are issues with subfolders there, i.e.:
I don't know if current POSIX FileFinder supports subfolder scanning but this could be slow with lots of font families installed. Or make it even uglier using popular dejavu paths for popular distros. The good: use FcFontList from Fontconfig: FontConfig was designed as a solution for this path mess. It's just a XML file with font path definitions and a C API to manage them. Also features family and type selection even for language support, which it is good for us. |
shared_ptr branch by take_cheeze contains a ready to use bitmap font (shinanome if I wrote this correctly). |
Ok, but he considered some RGSS font feature for later, so this can be removed from 0.1 milestone. |
RGSS font can use ./Font instead. Wontfix since shinonome works fine for general use. |
The player only loads the first font it finds via the file finder.
Maybe it would be useful to load the other fonts too so you can get proper japanese rendering when the first loaded font does not contain any japanese glyphs. ;)
Not sure if Freetype has a fallback already implemented but its likely that it has one...
The text was updated successfully, but these errors were encountered: