3 CODEPOINT
:= \\([0-9a-fA-F
]{2,5})
7 .PHONY
: all clean superclean
10 FONTSTANDARD
:= $(addprefix fontstandard.
,$(FORMATS
))
13 URL
:= https
://github.com
/FortAwesome
/Font-Awesome
/raw
/$(FAVERSION
)
16 VERSION
:= $(shell echo
$(FAVERSION
) | sed
-E
's/[^0-9]//g').
$(SUBVERSION
)
17 FONTAWESOME
:= FontAwesome_
$(VERSION
).otf
18 VARIABLES
:= variables_
$(VERSION
).less
22 FONTFORGE ?
= fontforge
23 CONVERT.ttf.woff
:= echo
'Open($$1); Generate($$2)' |
$(FONTFORGE
)
25 fontstandard.ttf
: $(FONTAWESOME
) fontstandard.fontforge
26 $(FONTFORGE
) $< $@
< fontstandard.fontforge
29 $(CONVERT.ttf.woff
) $< $@
32 wget
-O
$@
$(URL
)/fonts
/FontAwesome.otf
35 wget
-O
$@
$(URL
)/less
/variables.less
37 %.fontforge
: $(VARIABLES
) %.remove.txt
%.preamble.txt
%.remap.txt
38 echo
'Open($$1); Reencode("unicode4");' > $@
39 sed
-E
's/__VERSION__/$(VERSION)/' < $*.preamble.txt
>> $@
40 grep
-E
"@fa-var-("$$(grep
-v
'^#' $*.remove.txt \
41 | paste
-sd
'|' -)")[-a-z]*:" $(VARIABLES
) \
42 | sed
-E
's/.*$(CODEPOINT).*/SelectMore(0u\1);/g' >> $@
43 echo
'DetachAndRemoveGlyphs();' >> $@
45 grep
-v
'^#' $*.remap.txt | while read
-r dst src rest
; do \
46 (grep
-E
-m
1 "@fa-var-$${src}:" $(VARIABLES
) \
47 || echo
"$${src} not found." >&2) \
48 | sed
-E
's/.*$(CODEPOINT).*/Select(0u\1); CopyReference(); Select(0u'$${dst}'); Paste();/g' >> $@ \
51 echo
'Generate($$2)' >> $@
54 $(RM
) fontstandard.fontforge