mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-10-09 15:09:50 +03:00
Android: Load fonts from assets
Now fonts/ directory is bundled in APK as assets. TTF_OpenFont() can open files in Android assets, but cannot handle the "./" path prefix.
This commit is contained in:
@@ -34,6 +34,12 @@ android {
|
||||
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
||||
sourceSets.main {
|
||||
jniLibs.srcDir 'libs'
|
||||
assets.srcDir '../../fonts'
|
||||
}
|
||||
aaptOptions {
|
||||
// Disable asset compression for fonts.
|
||||
// Without this, text rendering will be very slow.
|
||||
noCompress 'ttf'
|
||||
}
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
||||
Reference in New Issue
Block a user