summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-09-16 13:52:43 +0300
committerVaadin Code Review <review@vaadin.com>2015-09-30 09:21:19 +0000
commitcc4f755a6c9cf996442f9c5356f6f0fbdcf41a8f (patch)
tree2e97e37f63a79124452207d8c9328994ddc2b2cf /scripts
parentdf0fee150d4cc195d057758d4af66afc63acdebe (diff)
downloadvaadin-framework-cc4f755a6c9cf996442f9c5356f6f0fbdcf41a8f.tar.gz
vaadin-framework-cc4f755a6c9cf996442f9c5356f6f0fbdcf41a8f.zip
Create a Valo icon font for icons used in Valo (#18472)
Valo uses only a handful of icons from Font Awesome. This change introduces a separate icon font for valo (9KB instead of 80KB) and decouples Valo from Font Awesome to enable updating Font Awesome without taking Valo into account. This change also makes it easy to not load Font Awesome when using Valo by setting $v-font-awesome:false For backwards compatibility, Font Awesome is loaded by default Change-Id: Ib01e3cf34e2468c885fcb8c7859cd1d1af4491aa
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/createValoIconsFont58
-rw-r--r--scripts/valoicons-generator_config.txt5
2 files changed, 63 insertions, 0 deletions
diff --git a/scripts/createValoIconsFont b/scripts/createValoIconsFont
new file mode 100755
index 0000000000..b48cf0e1e5
--- /dev/null
+++ b/scripts/createValoIconsFont
@@ -0,0 +1,58 @@
+#!/usr/local/bin/fontforge
+
+# use export FONTFORGE_LANGUAGE=ff before running the script
+
+# to install fontforge on mac, use "brew install fontforge"
+
+# Generated from FontAwesome 4.1:
+# https://github.com/FortAwesome/Font-Awesome/raw/v4.1.0/fonts/FontAwesome.otf
+
+# Download the font to WebContent/VAADIN/themes/valo/fonts/valoicons and run
+# the script there
+
+Open("FontAwesome.otf")
+
+# Icons used in Valo
+Select(0uf00c)
+SelectMore(0uf013)
+SelectMore(0uf032)
+SelectMore(0uf033)
+SelectMore(0uf036)
+SelectMore(0uf037)
+SelectMore(0uf038)
+SelectMore(0uf03b)
+SelectMore(0uf03c)
+SelectMore(0uf03e)
+SelectMore(0uf053)
+SelectMore(0uf054)
+SelectMore(0uf05e)
+SelectMore(0uf073)
+SelectMore(0uf078)
+SelectMore(0uf0c1)
+SelectMore(0uf0ca)
+SelectMore(0uf0cb)
+SelectMore(0uf0cc)
+SelectMore(0uf0cd)
+SelectMore(0uf0d7)
+SelectMore(0uf0d8)
+SelectMore(0uf0d9)
+SelectMore(0uf0da)
+SelectMore(0uf0dd)
+SelectMore(0uf0de)
+SelectMore(0uf100)
+SelectMore(0uf101)
+SelectMore(0uf104)
+SelectMore(0uf105)
+SelectMore(0uf127)
+SelectMore(0uf12b)
+SelectMore(0uf12c)
+SelectMore(0uf12d)
+SelectMore(0uf141)
+
+SelectInvert()
+DetachAndRemoveGlyphs()
+
+Generate("valoicons.otf")
+
+# valoicons.otf converted to webfonts using http://www.fontsquirrel.com/tools/webfont-generator and valoicons-generator_config.txt
+
diff --git a/scripts/valoicons-generator_config.txt b/scripts/valoicons-generator_config.txt
new file mode 100644
index 0000000000..a3c660c79b
--- /dev/null
+++ b/scripts/valoicons-generator_config.txt
@@ -0,0 +1,5 @@
+# Font Squirrel Font-face Generator Configuration File
+# Upload this file to the generator to recreate the settings
+# you used to create these fonts.
+
+{"mode":"expert","formats":["ttf","woff","woff2","eot","svg"],"tt_instructor":"default","fix_vertical_metrics":"Y","fallback":"custom","fallback_custom":"100","options_subset":"advanced","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0","rememberme":"Y"} \ No newline at end of file