summaryrefslogtreecommitdiff
path: root/platform/android/java/lib
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-11-21 15:04:01 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-12-04 18:44:20 +0200
commitecec415988de5b016c70512bbb6a7cfc04ccd0a2 (patch)
treef7c4b665d8b956d4210d48131c85f4c6bb0d136e /platform/android/java/lib
parent015dc492de33a41eaeb14c0503a6be10466fe457 (diff)
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts. Add function to get system fallback font from a font name, style, text, and language code. Implement system font support for Android. Use system fonts as a last resort fallback.
Diffstat (limited to 'platform/android/java/lib')
-rw-r--r--platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt b/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt
index c9282dd247..1a3576a6a9 100644
--- a/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt
+++ b/platform/android/java/lib/src/org/godotengine/godot/io/StorageScope.kt
@@ -90,6 +90,11 @@ internal enum class StorageScope {
return APP
}
+ var rootDir: String? = System.getenv("ANDROID_ROOT")
+ if (rootDir != null && canonicalPathFile.startsWith(rootDir)) {
+ return APP
+ }
+
if (sharedDir != null && canonicalPathFile.startsWith(sharedDir)) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
// Before R, apps had access to shared storage so long as they have the right