[mod] simple theme: include fonts

"npm run webfont" to build the fonts directory.
It requires fontforge and ttfautohint distro packages.

partial revert of commit 7137d2893f
This commit is contained in:
Alexandre Flament 2021-06-18 17:33:56 +02:00
parent d20f6a1f19
commit dca3bcca9e
13 changed files with 205 additions and 24 deletions

2
manage
View file

@ -295,7 +295,7 @@ gecko.driver() {
} }
node.env() { node.env() {
if ! required_commands npm fontforge ttfautohint; then if ! required_commands npm; then
info_msg "to install build tools use::" info_msg "to install build tools use::"
info_msg " sudo -H ./utils/searx.sh install buildhost" info_msg " sudo -H ./utils/searx.sh install buildhost"
die 1 "install needed build tools first" die 1 "install needed build tools first"

View file

@ -1,2 +1 @@
/node_modules /node_modules
ion.less

View file

@ -4,12 +4,12 @@
@font-face { @font-face {
font-family:"ion"; font-family:"ion";
src:url("../fonts/ion.eot?14747ff3e5db3853c40bc9540e9f6c3a"); src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45");
src:url("../fonts/ion.eot?14747ff3e5db3853c40bc9540e9f6c3a#iefix") format("embedded-opentype"), src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"),
url("../fonts/ion.woff2?14747ff3e5db3853c40bc9540e9f6c3a") format("woff2"), url("../fonts/ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"),
url("../fonts/ion.woff?14747ff3e5db3853c40bc9540e9f6c3a") format("woff"), url("../fonts/ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"),
url("../fonts/ion.ttf?14747ff3e5db3853c40bc9540e9f6c3a") format("truetype"), url("../fonts/ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"),
url("../fonts/ion.svg?14747ff3e5db3853c40bc9540e9f6c3a#ion") format("svg"); url("../fonts/ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg");
font-weight:normal; font-weight:normal;
font-style:normal; font-style:normal;
} }

View file

@ -61,12 +61,12 @@
@font-face { @font-face {
font-family:"ion"; font-family:"ion";
src:url("ion.eot?14747ff3e5db3853c40bc9540e9f6c3a"); src:url("ion.eot?31a1b735188db616a2142d17947e8a45");
src:url("ion.eot?14747ff3e5db3853c40bc9540e9f6c3a#iefix") format("embedded-opentype"), src:url("ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"),
url("ion.woff2?14747ff3e5db3853c40bc9540e9f6c3a") format("woff2"), url("ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"),
url("ion.woff?14747ff3e5db3853c40bc9540e9f6c3a") format("woff"), url("ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"),
url("ion.ttf?14747ff3e5db3853c40bc9540e9f6c3a") format("truetype"), url("ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"),
url("ion.svg?14747ff3e5db3853c40bc9540e9f6c3a#ion") format("svg"); url("ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg");
font-weight:normal; font-weight:normal;
font-style:normal; font-style:normal;
} }

View file

@ -1,11 +1,11 @@
<?xml version="1.0" standalone="no"?> <?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!-- <!--
2021-6-16: Created with FontForge (http://fontforge.org) 2021-6-21: Created with FontForge (http://fontforge.org)
--> -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<metadata> <metadata>
Created by FontForge 20190801 at Wed Jun 16 14:20:50 2021 Created by FontForge 20190801 at Mon Jun 21 10:06:22 2021
By alexandre By alexandre
</metadata> </metadata>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -7,7 +7,7 @@ module.exports = function(grunt) {
watch: { watch: {
scripts: { scripts: {
files: ['src/**'], files: ['src/**'],
tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production'] tasks: ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']
} }
}, },
jshint: { jshint: {
@ -117,7 +117,7 @@ module.exports = function(grunt) {
'node_modules/ionicons-npm/src/android-close.svg', 'node_modules/ionicons-npm/src/android-close.svg',
], ],
dest: 'fonts', dest: 'fonts',
destLess: '.', destLess: 'src/generated',
options: { options: {
font: 'ion', font: 'ion',
hashes : true, hashes : true,
@ -194,5 +194,5 @@ module.exports = function(grunt) {
grunt.registerTask('test', ['jshint']); grunt.registerTask('test', ['jshint']);
grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']); grunt.registerTask('default', ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']);
}; };

View file

@ -24,6 +24,7 @@
"all": "npm install && grunt", "all": "npm install && grunt",
"build": "grunt", "build": "grunt",
"watch": "grunt watch", "watch": "grunt watch",
"webfont": "grunt webfont",
"clean": "rm -Rf node_modules package-lock.json ion.less" "clean": "rm -Rf node_modules package-lock.json ion.less"
} }
} }

View file

@ -0,0 +1,181 @@
// Generated by grunt-webfont
@font-face {
font-family:"ion";
src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45");
src:url("../fonts/ion.eot?31a1b735188db616a2142d17947e8a45#iefix") format("embedded-opentype"),
url("../fonts/ion.woff2?31a1b735188db616a2142d17947e8a45") format("woff2"),
url("../fonts/ion.woff?31a1b735188db616a2142d17947e8a45") format("woff"),
url("../fonts/ion.ttf?31a1b735188db616a2142d17947e8a45") format("truetype"),
url("../fonts/ion.svg?31a1b735188db616a2142d17947e8a45#ion") format("svg");
font-weight:normal;
font-style:normal;
}
.ion-icon {
&:before {
font-family:"ion";
}
display:inline-block;
line-height:1;
font-weight:normal;
font-style:normal;
speak:none;
text-decoration:inherit;
text-transform:none;
text-rendering:auto;
-webkit-font-smoothing:antialiased;
-moz-osx-font-smoothing:grayscale;
}
// Icons
.ion-navicon-round {
&:before {
content:"\f101";
}
}
.ion-search {
&:before {
content:"\f102";
}
}
.ion-play {
&:before {
content:"\f103";
}
}
.ion-link {
&:before {
content:"\f104";
}
}
.ion-chevron-up {
&:before {
content:"\f105";
}
}
.ion-chevron-left {
&:before {
content:"\f106";
}
}
.ion-chevron-right {
&:before {
content:"\f107";
}
}
.ion-arrow-down-a {
&:before {
content:"\f108";
}
}
.ion-arrow-up-a {
&:before {
content:"\f109";
}
}
.ion-arrow-swap {
&:before {
content:"\f10a";
}
}
.ion-arrow-dropdown {
&:before {
content:"\f10b";
}
}
.ion-globe {
&:before {
content:"\f10c";
}
}
.ion-time {
&:before {
content:"\f10d";
}
}
.ion-location {
&:before {
content:"\f10e";
}
}
.ion-warning {
&:before {
content:"\f10f";
}
}
.ion-error {
&:before {
content:"\f110";
}
}
.ion-film-outline {
&:before {
content:"\f111";
}
}
.ion-music-note {
&:before {
content:"\f112";
}
}
.ion-more-vertical {
&:before {
content:"\f113";
}
}
.ion-magnet {
&:before {
content:"\f114";
}
}
.ion-close {
&:before {
content:"\f115";
}
}

View file

@ -11,6 +11,8 @@
@import (inline) "../../node_modules/normalize.css/normalize.css"; @import (inline) "../../node_modules/normalize.css/normalize.css";
@import "../generated/ion.less";
@import "definitions.less"; @import "definitions.less";
@import "mixins.less"; @import "mixins.less";
@ -22,8 +24,6 @@
@import "autocomplete.less"; @import "autocomplete.less";
// ion-icon // ion-icon
@import "../../ion.less";
.ion-icon-big { .ion-icon-big {
.ion-icon; .ion-icon;
font-size: 149%; font-size: 149%;

View file

@ -51,7 +51,7 @@ shellcheck"
BUILD_PACKAGES_debian="\ BUILD_PACKAGES_debian="\
firefox graphviz imagemagick texlive-xetex librsvg2-bin firefox graphviz imagemagick texlive-xetex librsvg2-bin
texlive-latex-recommended texlive-extra-utils fonts-dejavu texlive-latex-recommended texlive-extra-utils fonts-dejavu
latexmk fontforge ttfautohint latexmk
npm" npm"
# pacman packages # pacman packages
@ -63,7 +63,7 @@ shellcheck"
BUILD_PACKAGES_arch="\ BUILD_PACKAGES_arch="\
firefox graphviz imagemagick texlive-bin extra/librsvg firefox graphviz imagemagick texlive-bin extra/librsvg
texlive-core texlive-latexextra ttf-dejavu fontforge ttfautohint texlive-core texlive-latexextra ttf-dejavu
npm" npm"
# dnf packages # dnf packages
@ -77,7 +77,7 @@ BUILD_PACKAGES_fedora="\
firefox graphviz graphviz-gd ImageMagick librsvg2-tools firefox graphviz graphviz-gd ImageMagick librsvg2-tools
texlive-xetex-bin texlive-collection-fontsrecommended texlive-xetex-bin texlive-collection-fontsrecommended
texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts
dejavu-sans-mono-fonts fontforge ttfautohint dejavu-sans-mono-fonts
npm" npm"
# yum packages # yum packages