Debug Open Sans

pull/194/merge
M66B 3 years ago
parent 76f468dcb9
commit e72cd20111

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font
app:font="@font/opensans_regular"
app:fontStyle="normal"
app:fontWeight="400" />
<font
app:font="@font/opensans_italic"
app:fontStyle="italic"
app:fontWeight="400" />
<font
app:font="@font/opensans_bold"
app:fontStyle="normal"
app:fontWeight="700" />
<font
app:font="@font/opensans_bold_italic"
app:fontStyle="italic"
app:fontWeight="700" />
</font-family>

@ -931,6 +931,8 @@ public class StyleHelper {
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
// TODO: Microsoft: Georgia (Serif), Tahoma (Sans-serif), Trebuchet MS (Sans-serif)
String faces = family.toLowerCase(Locale.ROOT);
if (faces.contains("open sans"))
return "Open Sans, Arial, Verdana, Helvetica, Helvetica Neue, sans-serif";
if (faces.contains("arimo"))
return "Arimo, Arial, Verdana, Helvetica, Helvetica Neue, sans-serif";
if (faces.contains("tinos"))
@ -970,6 +972,9 @@ public class StyleHelper {
return ResourcesCompat.getFont(context, R.font.fantasy);
if (bundled_fonts) {
if (faces.contains("open sans"))
return ResourcesCompat.getFont(context, R.font.opensans);
if (faces.contains("arimo") ||
faces.contains("arial") ||
faces.contains("verdana") ||
@ -1033,6 +1038,8 @@ public class StyleHelper {
result.add(new FontDescriptor("cousine", "Cousine (Courier New)", true));
result.add(new FontDescriptor("lato", "Lato (Calibri)", true));
result.add(new FontDescriptor("caladea", "Caladea (Cambria)", true));
if (BuildConfig.DEBUG)
result.add(new FontDescriptor("open sans", "Open Sans", true));
result.add(new FontDescriptor("comic sans", "OpenDyslexic", true));
}

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto">
<font
app:font="@font/arimo_regular"
app:fontStyle="normal"
app:fontWeight="400" />
<font
app:font="@font/arimo_italic"
app:fontStyle="italic"
app:fontWeight="400" />
<font
app:font="@font/arimo_bold"
app:fontStyle="normal"
app:fontWeight="700" />
<font
app:font="@font/arimo_bolditalic"
app:fontStyle="italic"
app:fontWeight="700" />
</font-family>
Loading…
Cancel
Save