Update default font substitution list
* src/sfntfont-android.c (init_sfntfont_android): Account for Android 4.x not distributing Noto Serif.
This commit is contained in:
parent
35205f19ca
commit
9e78b82d1b
1 changed files with 21 additions and 1 deletions
|
@ -746,13 +746,19 @@ syms_of_sfntfont_android_for_pdumper (void)
|
|||
void
|
||||
init_sfntfont_android (void)
|
||||
{
|
||||
int api_level;
|
||||
|
||||
if (!android_init_gui)
|
||||
return;
|
||||
|
||||
api_level = android_get_current_api_level ();
|
||||
|
||||
/* Make sure to pick the proper Sans Serif and Serif fonts for the
|
||||
version of Android the device is running. */
|
||||
|
||||
if (android_get_current_api_level () >= 15)
|
||||
if (api_level >= 21)
|
||||
/* Android 5.0 and later distribute Noto Serif in lieu of Droid
|
||||
Serif. */
|
||||
Vsfnt_default_family_alist
|
||||
= list4 (Fcons (build_string ("Monospace"),
|
||||
build_string ("Droid Sans Mono")),
|
||||
|
@ -764,6 +770,20 @@ init_sfntfont_android (void)
|
|||
build_string ("Roboto")),
|
||||
Fcons (build_string ("DejaVu Serif"),
|
||||
build_string ("Noto Serif")));
|
||||
else if (api_level >= 15)
|
||||
/* Android 4.0 and later distribute Roboto in lieu of Droid
|
||||
Sans. */
|
||||
Vsfnt_default_family_alist
|
||||
= list4 (Fcons (build_string ("Monospace"),
|
||||
build_string ("Droid Sans Mono")),
|
||||
/* Android doesn't come with a Monospace Serif font, so
|
||||
this will have to do. */
|
||||
Fcons (build_string ("Monospace Serif"),
|
||||
build_string ("Droid Sans Mono")),
|
||||
Fcons (build_string ("Sans Serif"),
|
||||
build_string ("Roboto")),
|
||||
Fcons (build_string ("DejaVu Serif"),
|
||||
build_string ("Droid Serif")));
|
||||
else
|
||||
Vsfnt_default_family_alist
|
||||
= list4 (Fcons (build_string ("Monospace"),
|
||||
|
|
Loading…
Add table
Reference in a new issue