diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md
index 975f75893e..f334ad3cc7 100644
--- a/ATTRIBUTION.md
+++ b/ATTRIBUTION.md
@@ -47,3 +47,4 @@ FairEmail uses:
* [MaterialDings](https://github.com/Accusoft/MaterialDings). Copyright (c) 2018 Accusoft Corporation. [MIT License](https://github.com/Accusoft/MaterialDings/blob/master/LICENSE.md).
* [Send](https://github.com/timvisee/send). [Mozilla Public License 2.0](https://github.com/timvisee/send/blob/master/LICENSE).
* [DetectHtml](https://github.com/dbennett455/DetectHtml). [The MIT License](https://github.com/dbennett455/DetectHtml/blob/master/LICENSE).
+* [Liberation Sans Narrow font](https://github.com/liberationfonts/liberation-sans-narrow). Copyright (C) 1989, 1991 Free Software Foundation, Inc. [GNU General Public License version 2 with exceptions](https://fedoraproject.org/wiki/Licensing/LiberationFontLicense).
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2d81f83c61..d5de364d3e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,12 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### [Vallibonavenatrix](https://en.wikipedia.org/wiki/Vallibonavenatrix)
+### Next version
+
+* Added [Liberation Sans Narrow](https://github.com/liberationfonts/liberation-sans-narrow) font (advanced display options)
+* Small improvements and minor bug fixes
+* Updated [translations](https://crowdin.com/project/open-source-email)
+
### 1.2107 - 2023-10-04
* Added rule action to execute webhooks
diff --git a/app/src/main/assets/ATTRIBUTION.md b/app/src/main/assets/ATTRIBUTION.md
index 975f75893e..f334ad3cc7 100644
--- a/app/src/main/assets/ATTRIBUTION.md
+++ b/app/src/main/assets/ATTRIBUTION.md
@@ -47,3 +47,4 @@ FairEmail uses:
* [MaterialDings](https://github.com/Accusoft/MaterialDings). Copyright (c) 2018 Accusoft Corporation. [MIT License](https://github.com/Accusoft/MaterialDings/blob/master/LICENSE.md).
* [Send](https://github.com/timvisee/send). [Mozilla Public License 2.0](https://github.com/timvisee/send/blob/master/LICENSE).
* [DetectHtml](https://github.com/dbennett455/DetectHtml). [The MIT License](https://github.com/dbennett455/DetectHtml/blob/master/LICENSE).
+* [Liberation Sans Narrow font](https://github.com/liberationfonts/liberation-sans-narrow). Copyright (C) 1989, 1991 Free Software Foundation, Inc. [GNU General Public License version 2 with exceptions](https://fedoraproject.org/wiki/Licensing/LiberationFontLicense).
diff --git a/app/src/main/assets/CHANGELOG.md b/app/src/main/assets/CHANGELOG.md
index 2d81f83c61..d5de364d3e 100644
--- a/app/src/main/assets/CHANGELOG.md
+++ b/app/src/main/assets/CHANGELOG.md
@@ -6,6 +6,12 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### [Vallibonavenatrix](https://en.wikipedia.org/wiki/Vallibonavenatrix)
+### Next version
+
+* Added [Liberation Sans Narrow](https://github.com/liberationfonts/liberation-sans-narrow) font (advanced display options)
+* Small improvements and minor bug fixes
+* Updated [translations](https://crowdin.com/project/open-source-email)
+
### 1.2107 - 2023-10-04
* Added rule action to execute webhooks
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptions.java b/app/src/main/java/eu/faircode/email/FragmentOptions.java
index 1142b8dc81..76b8fbe8b2 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptions.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptions.java
@@ -150,7 +150,7 @@ public class FragmentOptions extends FragmentBase {
"keywords_header", "labels_header", "flags", "flags_background", "preview", "preview_italic", "preview_lines", "align_header",
"message_zoom", "overview_mode", "addresses", "button_extra", "attachments_alt", "thumbnails",
"contrast", "hyphenation", "display_font", "monospaced_pre",
- "list_count", "bundled_fonts", "parse_classes",
+ "list_count", "bundled_fonts", "narrow_fonts", "parse_classes",
"background_color", "text_color", "text_size", "text_font", "text_align", "text_titles", "text_separators",
"collapse_quotes", "image_placeholders", "inline_images",
"seekbar", "actionbar", "actionbar_swap", "actionbar_color", "group_category",
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java
index c8b2adc058..3ebbe95f61 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsDisplay.java
@@ -184,6 +184,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
private SwitchCompat swListCount;
private SwitchCompat swBundledFonts;
+ private SwitchCompat swNarrowFonts;
private SwitchCompat swParseClasses;
private SwitchCompat swBackgroundColor;
private SwitchCompat swTextColor;
@@ -220,7 +221,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
"text_separators",
"collapse_quotes", "image_placeholders", "inline_images", "button_extra",
"unzip", "attachments_alt", "thumbnails",
- "list_count", "bundled_fonts", "parse_classes",
+ "list_count", "bundled_fonts", "narrow_fonts", "parse_classes",
"background_color", "text_color", "text_size", "text_font", "text_align", "text_titles",
"authentication", "authentication_indicator"
};
@@ -353,6 +354,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swListCount = view.findViewById(R.id.swListCount);
swBundledFonts = view.findViewById(R.id.swBundledFonts);
+ swNarrowFonts = view.findViewById(R.id.swNarrowFonts);
swParseClasses = view.findViewById(R.id.swParseClasses);
swBackgroundColor = view.findViewById(R.id.swBackgroundColor);
swTextColor = view.findViewById(R.id.swTextColor);
@@ -1316,6 +1318,14 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("bundled_fonts", checked).apply();
+ swNarrowFonts.setEnabled(checked);
+ }
+ });
+
+ swNarrowFonts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ prefs.edit().putBoolean("narrow_fonts", checked).apply();
}
});
@@ -1637,6 +1647,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swListCount.setChecked(prefs.getBoolean("list_count", false));
swBundledFonts.setChecked(prefs.getBoolean("bundled_fonts", true));
+ swNarrowFonts.setChecked(prefs.getBoolean("narrow_fonts", false));
+ swNarrowFonts.setEnabled(swBundledFonts.isChecked());
swParseClasses.setChecked(prefs.getBoolean("parse_classes", true));
swBackgroundColor.setChecked(prefs.getBoolean("background_color", false));
swTextColor.setChecked(prefs.getBoolean("text_color", true));
diff --git a/app/src/main/java/eu/faircode/email/StyleHelper.java b/app/src/main/java/eu/faircode/email/StyleHelper.java
index 9da7674a63..ee8a52b999 100644
--- a/app/src/main/java/eu/faircode/email/StyleHelper.java
+++ b/app/src/main/java/eu/faircode/email/StyleHelper.java
@@ -1806,6 +1806,8 @@ public class StyleHelper {
return "Caladea, Cambo, Cambria, serif";
if (faces.contains("comic sans"))
return "OpenDyslexic, \"Comic Sans\", \"Comic Sans MS\", sans-serif";
+ if (faces.contains("sans narrow"))
+ return "\"Liberation Sans Narrow\", \"Arial Narrow\"";
return family;
}
@@ -1820,6 +1822,7 @@ public class StyleHelper {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean bundled_fonts = prefs.getBoolean("bundled_fonts", true);
+ boolean narrow_fonts = prefs.getBoolean("narrow_fonts", false);
List faces = new ArrayList<>();
for (String face : family.split(","))
@@ -1871,6 +1874,11 @@ public class StyleHelper {
faces.contains("comic sans") ||
faces.contains("comic sans ms"))
return ResourcesCompat.getFont(context.getApplicationContext(), R.font.opendyslexic);
+
+ if (narrow_fonts &&
+ (faces.contains("sans narrow") ||
+ faces.contains("arial narrow"))) // condensed, compressed
+ return ResourcesCompat.getFont(context.getApplicationContext(), R.font.liberation_sans_narrow_regular);
}
for (String face : faces) {
@@ -1903,6 +1911,7 @@ public class StyleHelper {
public static List getFonts(Context context, boolean all) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean bundled_fonts = prefs.getBoolean("bundled_fonts", true);
+ boolean narrow_fonts = prefs.getBoolean("narrow_fonts", false);
List result = new ArrayList<>();
String[] fontNameNames = context.getResources().getStringArray(R.array.fontNameNames);
@@ -1918,6 +1927,9 @@ public class StyleHelper {
result.add(new FontDescriptor("lato", "Lato (Calibri)", true));
result.add(new FontDescriptor("caladea", "Caladea (Cambria)", true));
+ if (all || narrow_fonts)
+ result.add(new FontDescriptor("sans narrow", "Liberation Sans Narrow (Arial Narrow)", true));
+
if (BuildConfig.DEBUG) {
result.add(new FontDescriptor("montserrat", "Montserrat", true));
}
diff --git a/app/src/main/res/font/liberation_sans_narrow_regular.ttf b/app/src/main/res/font/liberation_sans_narrow_regular.ttf
new file mode 100644
index 0000000000..b992c6d2b0
Binary files /dev/null and b/app/src/main/res/font/liberation_sans_narrow_regular.ttf differ
diff --git a/app/src/main/res/layout/fragment_options_display.xml b/app/src/main/res/layout/fragment_options_display.xml
index d700bc2a7a..ee5b740b68 100644
--- a/app/src/main/res/layout/fragment_options_display.xml
+++ b/app/src/main/res/layout/fragment_options_display.xml
@@ -2089,6 +2089,19 @@
app:layout_constraintTop_toBottomOf="@id/swListCount"
app:switchPadding="12dp" />
+
+
Colorize the Android navigation bar
Show the number of messages or conversations in the top action bar
Use bundled fonts
+ Use narrow fonts
Parse style sheets
Show authentication warnings
The underlying checks can be configured in the receive settings
diff --git a/gradle.properties b/gradle.properties
index ab351c0562..d63af99f41 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -11,7 +11,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
-org.gradle.jvmargs=-Xmx1536m
+org.gradle.jvmargs=-Xmx1280m
org.gradle.warning.mode=all
android.useAndroidX=true
diff --git a/metadata/en-US/changelogs/2107.txt b/metadata/en-US/changelogs/2107.txt
index 9da07099fd..493ffaf9de 100644
--- a/metadata/en-US/changelogs/2107.txt
+++ b/metadata/en-US/changelogs/2107.txt
@@ -6,6 +6,12 @@ For support you can use the contact form.
Vallibonavenatrix
+Next version
+
+* Added Liberation Sans Narrow
+* Small improvements and minor bug fixes
+* Updated translations
+
1.2107 - 2023-10-04
* Added rule action to execute webhooks