[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 203 additions and 22 deletions

2
manage
View File

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

View File

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

View File

@ -4,12 +4,12 @@
@font-face {
font-family:"ion";
src:url("../fonts/ion.eot?14747ff3e5db3853c40bc9540e9f6c3a");
src:url("../fonts/ion.eot?14747ff3e5db3853c40bc9540e9f6c3a#iefix") format("embedded-opentype"),
url("../fonts/ion.woff2?14747ff3e5db3853c40bc9540e9f6c3a") format("woff2"),
url("../fonts/ion.woff?14747ff3e5db3853c40bc9540e9f6c3a") format("woff"),
url("../fonts/ion.ttf?14747ff3e5db3853c40bc9540e9f6c3a") format("truetype"),
url("../fonts/ion.svg?14747ff3e5db3853c40bc9540e9f6c3a#ion") format("svg");
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;
}

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -7,7 +7,7 @@ module.exports = function(grunt) {
watch: {
scripts: {
files: ['src/**'],
tasks: ['jshint', 'concat', 'uglify', 'webfont', 'less:development', 'less:production']
tasks: ['jshint', 'copy', 'concat', 'uglify', 'less:development', 'less:production']
}
},
jshint: {
@ -117,7 +117,7 @@ module.exports = function(grunt) {
'node_modules/ionicons-npm/src/android-close.svg',
],
dest: 'fonts',
destLess: '.',
destLess: 'src/generated',
options: {
font: 'ion',
hashes : true,
@ -194,5 +194,5 @@ module.exports = function(grunt) {
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",
"build": "grunt",
"watch": "grunt watch",
"webfont": "grunt webfont",
"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 "../generated/ion.less";
@import "definitions.less";
@import "mixins.less";
@ -22,8 +24,6 @@
@import "autocomplete.less";
// ion-icon
@import "../../ion.less";
.ion-icon-big {
.ion-icon;
font-size: 149%;

View File

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