Răsfoiți Sursa

Add more glyphs for opensans font (#1032)

* Add more glyphs for opensans font

* Update .htaccess to support woff2 file format

* Fixed browser support for new font face

* Fixed Origine theme css and .htaccess

* Deleted unneeded fonts

* Added stylefiles for OpenSans font

* Fixed all themes with new font css

* Avoid additional CSS file

* htaccess cache control public

* Font casing bug

* Remove TTF font

Too big, low need https://caniuse.com/#search=woff

* Changelog 1032

https://github.com/FreshRSS/FreshRSS/pull/1032
https://github.com/FreshRSS/FreshRSS/pull/1028
Pavel Pletenev 8 ani în urmă
părinte
comite
ac73ba3acc

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@
 * Features
 	* Share with Mastodon [#1521](https://github.com/FreshRSS/FreshRSS/issues/1521)
 * UI
+	* Add more Unicode glyphs in the Open Sans font [#1032](https://github.com/FreshRSS/FreshRSS/pull/1032)
 	* Show URL to add subscriptions from third-party tools [#1247](https://github.com/FreshRSS/FreshRSS/issues/1247)
 	* Improved message when checking for new versions [#1586](https://github.com/FreshRSS/FreshRSS/issues/1586)
 * SimplePie

+ 8 - 1
p/.htaccess

@@ -6,6 +6,11 @@ FileETag	None
 AddDefaultCharset	UTF-8
 
 <IfModule mod_mime.c>
+	AddType application/json .map
+	AddType application/font-woff .woff
+	AddType application/font-woff2 .woff2
+
+	AddCharset	UTF-8	.css
 	AddCharset	UTF-8	.html
 	AddCharset	UTF-8	.js
 </IfModule>
@@ -16,6 +21,8 @@ AddDefaultCharset	UTF-8
 
 <IfModule mod_expires.c>
 	ExpiresActive	on
+	ExpiresByType	application/font-woff	"access plus 1 month"
+	ExpiresByType	application/font-woff2	"access plus 1 month"
 	ExpiresByType	application/javascript	"access plus 1 month"
 	ExpiresByType	application/xhtml+xml	"access plus 1 month"
 	ExpiresByType	image/x-icon	"access plus 1 month"
@@ -27,7 +34,7 @@ AddDefaultCharset	UTF-8
 </IfModule>
 
 <IfModule mod_headers.c>
-	<FilesMatch "\.(css|gif|html|ico|js|png|svg|woff)$">
+	<FilesMatch "\.(css|gif|html|ico|js|png|svg|woff|woff2)$">
 		Header	merge Cache-Control "public"
 	</FilesMatch>
 </IfModule>

+ 0 - 6
p/themes/BlueLagoon/BlueLagoon.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {

+ 0 - 6
p/themes/Dark/dark.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {

+ 0 - 6
p/themes/Flat/flat.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {

+ 0 - 6
p/themes/Origine/origine.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {

+ 1 - 7
p/themes/Pafat/pafat.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {
@@ -1069,4 +1063,4 @@ a.btn {
 	.notification a.close .icon {
 		display: none;
 	}
-}
+}

+ 0 - 6
p/themes/Screwdriver/screwdriver.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {

+ 0 - 6
p/themes/base-theme/base.css

@@ -1,11 +1,5 @@
 @charset "UTF-8";
 
-/*=== FONTS */
-@font-face {
-	font-family: "OpenSans";
-	src: url("../fonts/openSans.woff") format("woff");
-}
-
 /*=== GENERAL */
 /*============*/
 html, body {

+ 10 - 0
p/themes/base-theme/template.css

@@ -2,9 +2,19 @@
 
 /*=== GENERAL */
 /*============*/
+@font-face {
+	font-family: 'OpenSans';
+	font-style: normal;
+	font-weight: 400;
+	src: local('Open Sans'), local('OpenSans'),
+		url('../fonts/OpenSans.woff2') format('woff2'),
+		url('../fonts/OpenSans.woff') format('woff');
+}
+
 html, body {
 	margin: 0;
 	padding: 0;
+	font-family: "OpenSans", "Cantarell", "Helvetica", "Arial", sans-serif;
 	font-size: 100%;
 }
 

BIN
p/themes/fonts/OpenSans.woff


BIN
p/themes/fonts/OpenSans.woff2


BIN
p/themes/fonts/openSans.woff