mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-09 15:27:55 -04:00
Add two override fonts to cover the Gujarati and Oriya/Odia scripts.
Add code to select these fonts in preference to DejaVu based on the language code. This fixes bug 699.
This commit is contained in:
parent
4c703d108f
commit
cf5e77de78
BIN
assets/fonts/Lohit-Gujarati.ttf
Normal file
BIN
assets/fonts/Lohit-Gujarati.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/Lohit-Odia.ttf
Normal file
BIN
assets/fonts/Lohit-Odia.ttf
Normal file
Binary file not shown.
@ -253,7 +253,15 @@ public class LanguageUtils {
|
||||
// Define the exceptions to the rule. The font has to be placed in the assets folder.
|
||||
// Key: the language code; Value: the name of the font.
|
||||
HashMap<String, String> exceptions = new HashMap<String, String>();
|
||||
exceptions.put("gu", "fonts/Lohit-Gujarati.ttf");
|
||||
exceptions.put("my", "fonts/Parabaik.ttf");
|
||||
exceptions.put("or", "fonts/Lohit-Odia.ttf");
|
||||
// These scripts could be supported via more Lohit fonts if DevaVu doesn't
|
||||
// support them. That is untested now as they aren't even in the language
|
||||
// menu:
|
||||
// * (no ISO code?) (Devanagari/Nagari) -- at 0% in translatewiki
|
||||
// * mr (Marathi) -- at 21% in translatewiki
|
||||
// * pa (Punjabi) -- at 3% in translatewiki
|
||||
|
||||
// Check, if an exception applies to our current locale
|
||||
if (exceptions.containsKey(Locale.getDefault().getLanguage())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user