fonts-degooglifier issueshttps://git.occrp.org/libre/fonts-degooglifier/-/issues2019-04-08T14:01:13Zhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/7On macOS, an `\n` is added before `.css` in downloaded CSS files2019-04-08T14:01:13ZAleksandar TodorovićOn macOS, an `\n` is added before `.css` in downloaded CSS filesThat's a bug:
- https://chaos.social/@lastfuture/101482943615321841
```
bash /Users/peter/Downloads/degooglify.sh 'https://fonts.googleapis.com/css?family=Major+Mono+Display&subset=latin-ext'
+-- downloading remote CSS:
+...That's a bug:
- https://chaos.social/@lastfuture/101482943615321841
```
bash /Users/peter/Downloads/degooglify.sh 'https://fonts.googleapis.com/css?family=Major+Mono+Display&subset=latin-ext'
+-- downloading remote CSS:
+-- source URL : https://fonts.googleapis.com/css?family=Major+Mono+Display&subset=latin-ext
+-- destination file : Major-Mono-Display__subset-latin-ext
.css
--2019-01-26 13:43:19-- https://fonts.googleapis.com/css?family=Major+Mono+Display&subset=latin-ext
Resolving fonts.googleapis.com (fonts.googleapis.com)... 2a00:1450:4001:819::200a, 172.217.21.202
Connecting to fonts.googleapis.com (fonts.googleapis.com)|2a00:1450:4001:819::200a|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/css]
Saving to: 'Major-Mono-Display__subset-latin-ext\n.css'
0K 2.79M=0s
2019-01-26 13:43:19 (2.79 MB/s) - 'Major-Mono-Display__subset-latin-ext\n.css' saved [287]
+-- de-googlifying import statements: Major-Mono-Display__subset-latin-ext
.css
+-- destination font directory : fonts/
+-- destination CSS file : Major-Mono-Display__subset-latin-ext
.degooglified.css
+-- de-googlifying src lines: Major-Mono-Display__subset-latin-ext
.css
+-- destination font directory : fonts/
+-- destination CSS file : Major-Mono-Display__subset-latin-ext
.degooglified.css
NOTICE: destination CSS file already exists: 'Major-Mono-Display__subset-latin-ext
.degooglified.css'
NOTICE: (this will not work great if the source or destination)
NOTICE: (files were changed by external programs )
+-- working with: src: local('Major Mono Display Regular'), local('MajorMonoDisplay-Regular'), url(https://fonts.gstatic.com/s/majormonodisplay/v2/RWmVoLyb5fEqtsfBX9PDZIGr2tFubRh7DXeU.ttf) format('truetype');
+-- URL: https://fonts.gstatic.com/s/majormonodisplay/v2/RWmVoLyb5fEqtsfBX9PDZIGr2tFubRh7DXeU.ttf
+-- target: fonts/MajorMonoDisplay-Regular.ttf
--2019-01-26 13:43:19-- https://fonts.gstatic.com/s/majormonodisplay/v2/RWmVoLyb5fEqtsfBX9PDZIGr2tFubRh7DXeU.ttf
Resolving fonts.gstatic.com (fonts.gstatic.com)... 2a00:1450:4001:806::2003, 216.58.207.35
Connecting to fonts.gstatic.com (fonts.gstatic.com)|2a00:1450:4001:806::2003|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [font/ttf]
Saving to: 'fonts/MajorMonoDisplay-Regular.ttf'
0K .......... .......... .......... .......... 1.23M=0.03s
2019-01-26 13:43:19 (1.23 MB/s) - 'fonts/MajorMonoDisplay-Regular.ttf' saved [41476]
```Aleksandar TodorovićAleksandar Todorovićhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/6For greater compatibility, use sed's -E option rather than -r2019-04-08T14:01:13ZAleksandar TodorovićFor greater compatibility, use sed's -E option rather than -rNot all `sed`'s are created equal. Some support both `-r` and `-E` flag telling them to use extended regular expressions; some only `-E`:
- https://chaos.social/@lastfuture/101482903706088757Not all `sed`'s are created equal. Some support both `-r` and `-E` flag telling them to use extended regular expressions; some only `-E`:
- https://chaos.social/@lastfuture/101482903706088757Aleksandar TodorovićAleksandar Todorovićhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/5Use either curl or wget, depending on what's available2019-04-08T14:01:14ZAleksandar TodorovićUse either curl or wget, depending on what's availableOn Debian, `wget` is massively more popular than `curl`:
- https://qa.debian.org/popcon.php?package=wget
- https://qa.debian.org/popcon.php?package=curl
On other platforms it often is the other way around:
- https://mastodon.soc...On Debian, `wget` is massively more popular than `curl`:
- https://qa.debian.org/popcon.php?package=wget
- https://qa.debian.org/popcon.php?package=curl
On other platforms it often is the other way around:
- https://mastodon.social/@WingmanJD/101477505696599249
It shoiuldn't be too hard to make the script able to use either, depending which is available.Aleksandar TodorovićAleksandar Todorovićhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/4font-degooglifier fails with old bash on macOS2019-04-08T14:01:14ZAleksandar Todorovićfont-degooglifier fails with old bash on macOSApparently macOS still ships with Bash 3.x, and we're using some features of Bash 4.x:
- https://chaos.social/@lastfuture/101482240857586609
- https://stackoverflow.com/questions/47815637/getting-bad-substitution-error-with-a-shell-scr...Apparently macOS still ships with Bash 3.x, and we're using some features of Bash 4.x:
- https://chaos.social/@lastfuture/101482240857586609
- https://stackoverflow.com/questions/47815637/getting-bad-substitution-error-with-a-shell-script-on-a-mac/47815884#47815884Aleksandar TodorovićAleksandar Todorovićhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/3Support direct download of a CSS file2019-04-08T14:01:14ZAleksandar TodorovićSupport direct download of a CSS fileGoogle Fonts provides people with a HTTPS link. It would be great if the script could just download the HTTPS link directly, instead of the user having to download the script manually and then running te script on that file.
Related: #1Google Fonts provides people with a HTTPS link. It would be great if the script could just download the HTTPS link directly, instead of the user having to download the script manually and then running te script on that file.
Related: #1Aleksandar TodorovićAleksandar Todorovićhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/2Add an optional --destination argument2019-04-08T14:01:14ZAleksandar TodorovićAdd an optional --destination argumentWe should add a way of specifying the destination folder explicitly.We should add a way of specifying the destination folder explicitly.Aleksandar TodorovićAleksandar Todorovićhttps://git.occrp.org/libre/fonts-degooglifier/-/issues/1Support @import2019-04-08T14:01:14ZAleksandar TodorovićSupport @importThe script should support `@import` stanzas that get font-related CSS from `fonts.googleapis.com/css`.
Example:
```
@import url('https://fonts.googleapis.com/css?family=Aleo|Oswald|Raleway|Roboto');
font-family: 'Roboto', sans-se...The script should support `@import` stanzas that get font-related CSS from `fonts.googleapis.com/css`.
Example:
```
@import url('https://fonts.googleapis.com/css?family=Aleo|Oswald|Raleway|Roboto');
font-family: 'Roboto', sans-serif;
font-family: 'Oswald', sans-serif;
font-family: 'Raleway', sans-serif;
font-family: 'Aleo', serif;
```Aleksandar TodorovićAleksandar Todorović