Improve the references to the local fonts
src:url() only accepts format(), not type(). Source: https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src This should improve rendering of fonts via webserver. Fixing this uncovered another issue: if src:url is correctly specified, Firefox attempts to load the fonts from that url, rather than look for the local font first. To achieve the correct lookup order, src:local() should be defined before the url. Firefox then loads from the first found location.
This commit is contained in:
parent
fef1a90465
commit
14997fd826
@ -104,8 +104,11 @@ for FONT in lato-normal=lato/Lato-Regular.ttf \
|
|||||||
do
|
do
|
||||||
L="${FONT%=*}"
|
L="${FONT%=*}"
|
||||||
R="${FONT#*=}"
|
R="${FONT#*=}"
|
||||||
|
# Get the font basename from the path
|
||||||
|
F="${R#*/}"
|
||||||
|
F_BASENAME="${F/.ttf}"
|
||||||
sed \
|
sed \
|
||||||
-e "s|src:\(url(fonts/$L\.[^)]*) format([^)]*),\?\)\+|src:url('/.sysassets/fonts/$R') type(\"truetype\")|g" \
|
-e "s|src:\(url(fonts/$L\.[^)]*) format([^)]*),\?\)\+|src:local('$F_BASENAME'),url('/.sysassets/fonts/$R') format(\"truetype\")|g" \
|
||||||
-i theme.css
|
-i theme.css
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -188,6 +191,7 @@ grep 'format("woff2\?")' \
|
|||||||
%changelog
|
%changelog
|
||||||
* Fri Jul 01 2022 Karolina Surma <ksurma@redhat.com> - 1.0.0-7
|
* Fri Jul 01 2022 Karolina Surma <ksurma@redhat.com> - 1.0.0-7
|
||||||
- Relax the python-docutils version requirement to <0.19
|
- Relax the python-docutils version requirement to <0.19
|
||||||
|
- Improve references to system fonts (needed by Firefox)
|
||||||
|
|
||||||
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.0.0-6
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1.0.0-6
|
||||||
- Rebuilt for Python 3.11
|
- Rebuilt for Python 3.11
|
||||||
|
Loading…
Reference in New Issue
Block a user