From: Joe Wreschnig Date: Tue, 30 Sep 2014 16:18:35 +0000 (+0200) Subject: Initial import. X-Git-Url: https://git.korewanetadesu.com/?p=fontstandard.git;a=commitdiff_plain;h=a45a0acf607dada6448c849c99f0c797b2a9a69c Initial import. --- a45a0acf607dada6448c849c99f0c797b2a9a69c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bcfb338 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +fontstandard.woff +fontstandard.svg +fontstandard.ttf +fontstandard.fontforge +variables.less +FontAwesome.otf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2df645e --- /dev/null +++ b/Makefile @@ -0,0 +1,60 @@ +#!/usr/bin/make -f + +CODEPOINT := \\([0-9a-fA-F]{2,5}) + +.DELETE_ON_ERROR: +.SECONDARY: +.PHONY: all clean superclean + +FORMATS := ttf woff +FONTSTANDARD := $(addprefix fontstandard.,$(FORMATS)) + +FAVERSION ?= v4.2.0 +URL := https://github.com/FortAwesome/Font-Awesome/raw/$(FAVERSION) + +SUBVERSION := 1 +VERSION := $(shell echo $(FAVERSION) | sed -E 's/[^0-9]//g').$(SUBVERSION) +FONTAWESOME := FontAwesome_$(VERSION).otf +VARIABLES := variables_$(VERSION).less + +all: $(FONTSTANDARD) + +FONTFORGE ?= fontforge +CONVERT.ttf.woff := echo 'Open($$1); Generate($$2)' | $(FONTFORGE) + +fontstandard.ttf: $(FONTAWESOME) fontstandard.fontforge + $(FONTFORGE) $< $@ < fontstandard.fontforge + +%.woff: %.ttf + $(CONVERT.ttf.woff) $< $@ + +$(FONTAWESOME): + wget -O $@ $(URL)/fonts/FontAwesome.otf + +$(VARIABLES): + wget -O $@ $(URL)/less/variables.less + +%.fontforge: $(VARIABLES) %.remove.txt %.preamble.txt %.remap.txt + echo 'Open($$1); Reencode("unicode4");' > $@ + sed -E 's/__VERSION__/$(VERSION)/' < $*.preamble.txt >> $@ + grep -E "@fa-var-("$$(grep -v '^#' $*.remove.txt \ + | paste -sd '|' -)")[-a-z]*:" $(VARIABLES) \ + | sed -E 's/.*$(CODEPOINT).*/SelectMore(0u\1);/g' >> $@ + echo 'DetachAndRemoveGlyphs();' >> $@ + + grep -v '^#' $*.remap.txt | while read line; do \ + a=( $$line ); \ + (grep -E -m 1 "@fa-var-$${a[1]}:" $(VARIABLES) \ + || echo "$${a[1]} not found." >&2) \ + | sed -E 's/.*$(CODEPOINT).*/Select(0u\1); CopyReference(); Select(0u'$${a[0]}'); Paste();/g' >> $@ \ + ; done + + echo 'Generate($$2)' >> $@ + +clean: + $(RM) fontstandard.fontforge + $(RM) $(FONTSTANDARD) + +superclean: clean + $(RM) $(FONTAWESOME) + $(RM) $(VARIABLES) diff --git a/README.md b/README.md new file mode 100644 index 0000000..e07de2d --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# Font Standard + +Font Standard is a suite of pictographic icons for easily scalable +vector graphics on websites. Those icons are assigned, when possible, +to a proper public Unicode codepoint, and do not include +questionably-licensed corporate logos, Libertarian tulips, or some +bullshit web service you'll forget about in less than a year. + +Font Standard is based on [Font Awesome][], which does not live up to +its name. It is about 40% smaller than Font Awesome (even smaller if +you no longer use FA's custom CSS), and usable in more situations. + +## Building + +Install [FontForge][], then at a command line, run + + make all + +Now you'll get `fontstandard.ttf` and `fontstandard.woff`. These can +be used as drop-in replacements for Font Awesome, or independently as +a font with many useful Unicode glyphs. + +## Compatibility + +Font Standard is compatible with Font Awesome, as long as you are not +using any [Brand Icons][] or its awful gender icons. (If you are using +any of these, reconsider the life choices that brought you to do so.) + +Font Standard is _also_ compatible with regular HTML, and +you can just assign a CSS font family and type Unicode characters like +♫ or ☕ and they will render appropriately. + +Font Standard mappings may change in future updates. For example, the +Font Awesome "bolt" icon (U+F0E7) is mapped to U+2301 (Electric +Arrow), U+26a1 (High Voltage Sign), and 1+F5F2 (Lightning Mood). If a +more "arrow-like" or "sign-like" bolt appears in Font Awesome in the +future, it might take over those slots. + +## Known Issues + +Some characters may be mis-mapped. Some characters are probably +suitable for mapping but are not yet. Let me know if you have +suggestions. + +## License + +The scripts that build Font Standard are hereby deeded to the +[public domain][]. The person who associated a work with this deed has +dedicated the work to the public domain by waiving all of his or her +rights to the work worldwide under copyright law, including all +related and neighboring rights, to the extent allowed by law. You can +copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. + +No claim is made on the "Font Standard" name. + +[Font Awesome][] by Dave Gandy is licensed under the [SIL OFL 1.1][] with +the reserved name "FontAwesome". + +[Font Awesome]: http://fontawesome.io/ +[FontForge]: http://fontforge.org/ +[Brand Icons]: http://fortawesome.github.io/Font-Awesome/icons/#brand +[SIL OFL 1.1]: http://scripts.sil.org/OFL +[public domain]: https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/fontstandard.preamble.txt b/fontstandard.preamble.txt new file mode 100644 index 0000000..4c0e5d8 --- /dev/null +++ b/fontstandard.preamble.txt @@ -0,0 +1,11 @@ +SetTTFName(0x409,1,"FontStandard"); +SetTTFName(0x409,2,"Regular"); +SetTTFName(0x409,3,"FontStandard"); +SetTTFName(0x409,4,"FontStandard"); +SetTTFName(0x409,5,"Version __VERSION__"); +SetTTFName(0x000,6,"FontStandard"); +SetTTFName(0x409,6,"FontStandard"); +SetTTFName(0x409,7,""); +SetTTFName(0x409,8,"Joe Wreschnig"); +SetTTFName(0x409,10,"A modification of Font Awesome to use standard Unicode codepoints and remove ads."); +SetTTFName(0x409,11,"http://git.korewanetadesu.com/fontstandard.git"); diff --git a/fontstandard.remap.txt b/fontstandard.remap.txt new file mode 100644 index 0000000..36c01be --- /dev/null +++ b/fontstandard.remap.txt @@ -0,0 +1,158 @@ + ab angle-double-left + bb angle-double-right + 2c2 angle-left + 2c3 angle-right + 2c4 angle-up + 2c5 angle-down + 2016 pause + 2190 arrow-left + 2191 arrow-up + 2192 arrow-right + 2193 arrow-down + 2194 arrows-h + 2195 arrows-v + 21b0 reply + 21b1 share + 21bb repeat + 21c4 exchange + 2217 asterisk + 2295 plus-circle + 2296 minus-circle + 2297 times-circle + 2298 ban + 229d minus-circle + 229e plus-square + 229f minus-square + 2301 bolt + 2302 home + 238c undo + 2399 print + 23cf eject + 23e9 forward + 23ea backward + 23ed fast-forward + 23ee fast-backward + 25a0 square + 25a1 square-o + 25a2 square-o + 25b4 caret-up + 25b6 play + 25b8 caret-right + 25ba play + 25be caret-down + 25c2 caret-left + 25c9 dot-circle-o + 25cb circle-o + 25ce bullseye + 25cf circle + 25d1 adjust + 25fc stop + 2601 cloud + 2602 umbrella + 2605 star + 2606 star-o + 260e phone + 2610 square-o + 2611 check-square-o + 2615 coffee + 261c hand-o-left + 261d hand-o-up + 261e hand-o-right + 261f hand-o-down + 263c sun-o + 2661 heart-o + 266b music + 2691 flag + 2693 anchor + 2699 cog + 26a0 exclamation-triangle + 26a1 bolt + 2702 cut + 2706 phone-square + 2708 plane + 2709 envelope + 270f pencil + 2713 check + 274c times + 275d quote-left + 275e quote-right + 2764 heart + 2795 plus + 2796 minus + 27f5 long-arrow-left + 27f6 long-arrow-right + f183 trash +1d400 font +1d401 bold +1d470 italic +1f30e globe +1f342 leaf +1f34b lemon-o +1f374 cutlery +1f378 glass +1f37a beer +1f381 gift +1f39e film +1f3a4 microphone +1f3a7 headphones +1f3c6 trophy +1f3e0 home +1f3e2 building +1f3e5 hospital-o +1f441 eye +1f44d thumbs-up +1f44e thumbs-down +1f464 user +1f465 users +1f4a1 lightbulb-o +1f4a3 bomb +1f4a7 tint +1f4ac comment +1f4ac comment-o +1f4b3 credit-card +1f4b5 money +1f4bb desktop +1f4bc briefcase +1f4be floppy-o +1f4c1 folder +1f4c2 folder-open +1f4c3 file +1f4c5 calendar +1f4c8 line-chart +1f4ca bar-chart +1f4cc thumb-tack +1f4cd map-marker +1f4ce paperclip +1f4d3 book +1f4d5 book +1f4dd pencil-square-o +1f4e3 bullhorn +1f4e5 inbox +1f4f1 mobile-phone +1f4f6 signal +1f4f7 camera +1f4f9 video-camera +1f500 random +1f501 refresh +1f508 volume-off +1f509 volume-down +1f50a volume-up +1f50d search +1f511 key +1f512 lock +1f513 unlock +1f514 bell +1f515 bell-slash +1f516 bookmark +1f517 link +1f525 fire +1f527 wrench +1f558 clock-o +1f5b4 hdd-o +1f5bb picture-o +1f5d1 trash +1f5d6 expand +1f5ea comments-o +1f5f2 bolt +1f691 ambulance +1f69a truck diff --git a/fontstandard.remove.txt b/fontstandard.remove.txt new file mode 100644 index 0000000..17869f8 --- /dev/null +++ b/fontstandard.remove.txt @@ -0,0 +1,66 @@ +adn +android +angellist +apple +behance +bitbucket +btc +cc- +codepen +css3 +delicious +deviantart +digg +dribbble +dropbox +drupal +empire +facebook +flickr +foursquare +git +google +hacker-news +html5 +instagram +ioxhost +joomla +jsfiddle +lastfm +linkedin +linux +maxcdn +meanpath +openid +pagelines +paypal +pied-piper +pinterest +qq +rebel +reddit +renren +skype +slack +slideshare +soundcloud +spotify +stack- +steam +stumbleupon +tencent-weibo +trello +tumblr +twitch +twitter +vimeo +vine +vk +weibo +weixin +windows +wordpress +xing +yahoo +yelp +youtube