mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-25 07:23:03 +00:00
Debug Open Sans
This commit is contained in:
parent
76f468dcb9
commit
e72cd20111
7 changed files with 45 additions and 0 deletions
19
app/src/debug/res/font/opensans.xml
Normal file
19
app/src/debug/res/font/opensans.xml
Normal file
|
@ -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>
|
BIN
app/src/debug/res/font/opensans_bold.ttf
Normal file
BIN
app/src/debug/res/font/opensans_bold.ttf
Normal file
Binary file not shown.
BIN
app/src/debug/res/font/opensans_bold_italic.ttf
Normal file
BIN
app/src/debug/res/font/opensans_bold_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/debug/res/font/opensans_italic.ttf
Normal file
BIN
app/src/debug/res/font/opensans_italic.ttf
Normal file
Binary file not shown.
BIN
app/src/debug/res/font/opensans_regular.ttf
Normal file
BIN
app/src/debug/res/font/opensans_regular.ttf
Normal file
Binary file not shown.
|
@ -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));
|
||||
}
|
||||
|
|
19
app/src/main/res/font/opensans.xml
Normal file
19
app/src/main/res/font/opensans.xml
Normal file
|
@ -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…
Reference in a new issue