Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Vitaly Puzrin
committed
Nov 17, 2012
0 parents
commit 5bfaf6c
Showing
32 changed files
with
2,479 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "support/font-builder"] | ||
path = support/font-builder | ||
url = git://github.com/fontello/font-builder.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Development docs | ||
================ | ||
|
||
Set if scripts to easily build webfonts from SVG images | ||
|
||
Installation | ||
------------ | ||
|
||
### Ubuntu | ||
|
||
**(!)** Use Ubuntu **12.04**. Or you will have to manually install fresh | ||
freetype library, to build ttfautohint. | ||
|
||
Init font-builder and build additional software (ttf2eot, ttfautohint): | ||
|
||
make support | ||
|
||
Install system dependencies (fontforge & python modules): | ||
|
||
cd support/font-builder && sudo make dev-deps | ||
|
||
|
||
If you are working on multiple font you would like to have only one instance of | ||
heavy dependencies like _ttfautohint_ installed. Run this: | ||
|
||
cd support/font-builder && sudo make support-install | ||
|
||
|
||
Note that you don't need to install system dependencies more than once. | ||
|
||
|
||
### Mac | ||
|
||
TBD. Anyone, please help. | ||
|
||
|
||
### Windows | ||
|
||
TBD. Anyone, please help. | ||
|
||
|
||
Making font | ||
----------- | ||
|
||
### Steps | ||
|
||
1. Place images into `/src/svg` folder. | ||
2. Add image info to `config.yml` (see comments in it) | ||
3. Edit css/html templates, if needed. | ||
4. Run `make` | ||
|
||
Generated data will be placed in `./font` | ||
|
||
You can rebuild css/html only with `make html` | ||
|
||
### SVG image requirements | ||
|
||
Any image will be proportionnaly scaled, to fit height in ascent-descent | ||
It's convenient to make height = 1000px. Default font baseline will be 20% from | ||
the bottom. | ||
|
||
In most cases it's ok to visually allign icons to middle line, not to baseline. | ||
If you are not shure, how to start - make image with 10% top/bottom padding. | ||
Then generate demo page and tune scale/offset. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
PROJECT := $(notdir ${PWD}) | ||
FONT_NAME := fontelico | ||
|
||
|
||
################################################################################ | ||
## ! DO NOT EDIT BELOW THIS LINE, UNLESS YOU REALLY KNOW WHAT ARE YOU DOING ! ## | ||
################################################################################ | ||
|
||
|
||
TMP_PATH := /tmp/${PROJECT}-$(shell date +%s) | ||
REMOTE_NAME ?= origin | ||
REMOTE_REPO ?= $(shell git config --get remote.${REMOTE_NAME}.url) | ||
|
||
|
||
# Add local versions of ttf2eot nd ttfautohint to the PATH | ||
PATH := $(PATH):./support/font-builder/support/ttf2eot | ||
PATH := $(PATH):./support/font-builder/support/ttfautohint/frontend | ||
PATH := $(PATH):./support/font-builder/bin | ||
|
||
|
||
dist: font html | ||
|
||
|
||
font: | ||
@if test ! -d support/font-builder/bin ; then \ | ||
echo "font-builder binaries not found. run:" >&2 ; \ | ||
echo " make support" >&2 ; \ | ||
exit 128 ; \ | ||
fi | ||
@if test ! `which ttf2eot` ; then \ | ||
echo "ttf2eot not found. run:" >&2 ; \ | ||
echo " make support" >&2 ; \ | ||
exit 128 ; \ | ||
fi | ||
@if test ! `which ttfautohint` ; then \ | ||
echo "ttfautohint not found. run:" >&2 ; \ | ||
echo " make support" >&2 ; \ | ||
exit 128 ; \ | ||
fi | ||
fontbuild.py -c ./config.yml -t ./src/font_template.sfd -i ./src/svg -o ./font/$(FONT_NAME).ttf | ||
font_transform.py -c ./config.yml -i ./font/$(FONT_NAME).ttf -o ./font/$(FONT_NAME)-transformed.ttf | ||
mv ./font/$(FONT_NAME)-transformed.ttf ./font/$(FONT_NAME).ttf | ||
ttfautohint --latin-fallback --hinting-limit=200 --hinting-range-max=50 --symbol ./font/$(FONT_NAME).ttf ./font/$(FONT_NAME)-hinted.ttf | ||
mv ./font/$(FONT_NAME)-hinted.ttf ./font/$(FONT_NAME).ttf | ||
fontconvert.py -i ./font/$(FONT_NAME).ttf -o ./font | ||
ttf2eot < ./font/$(FONT_NAME).ttf >./font/$(FONT_NAME).eot | ||
|
||
|
||
npm-deps: | ||
@if test ! `which npm` ; then \ | ||
echo "Node.JS and NPM are required for html demo generation." >&2 ; \ | ||
echo "This is non-fatal error and you'll still be able to build font," >&2 ; \ | ||
echo "however, to build demo with >> make html << you need:" >&2 ; \ | ||
echo " - Install Node.JS and NPM" >&2 ; \ | ||
echo " - Run this task once again" >&2 ; \ | ||
else \ | ||
npm install -g jade js-yaml.bin ; \ | ||
fi | ||
|
||
|
||
support: | ||
git submodule init support/font-builder | ||
git submodule update support/font-builder | ||
which ttf2eot ttfautohint > /dev/null || (cd support/font-builder && $(MAKE)) | ||
which js-yaml jade > /dev/null || $(MAKE) npm-deps | ||
|
||
|
||
html: | ||
tpl-render.js --locals config.yml --input ./src/demo/demo.jade --output ./font/demo.html | ||
|
||
|
||
gh-pages: | ||
@if test -z ${REMOTE_REPO} ; then \ | ||
echo 'Remote repo URL not found' >&2 ; \ | ||
exit 128 ; \ | ||
fi | ||
cp -r ./font ${TMP_PATH} && \ | ||
touch ${TMP_PATH}/.nojekyll | ||
cd ${TMP_PATH} && \ | ||
git init && \ | ||
git add . && \ | ||
git commit -q -m 'refreshed gh-pages' | ||
cd ${TMP_PATH} && \ | ||
git remote add remote ${REMOTE_REPO} && \ | ||
git push --force remote +master:gh-pages | ||
rm -rf ${TMP_PATH} | ||
|
||
|
||
dev-deps: | ||
@if test 0 -ne `id -u` ; then \ | ||
echo "root priveledges are required" >&2 ; \ | ||
exit 128 ; \ | ||
fi | ||
apt-get -qq install \ | ||
fontforge python python-fontforge libfreetype6-dev \ | ||
python-yaml python-pip \ | ||
build-essential \ | ||
autoconf automake libtool | ||
pip -q install pystache argparse | ||
|
||
|
||
clean: | ||
git clean -f -x | ||
|
||
|
||
.SILENT: dev-deps | ||
.PHONY: font support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Fontelico | ||
========= | ||
|
||
This iconic font contains different sexy icons, missed in other opensource | ||
collections. | ||
|
||
|
||
Contributors | ||
------------ | ||
|
||
- Angela Berbentseva (smiles, loads). [Email](mailto:berbentseva_angela@yahoo.com) | ||
|
||
|
||
Sponsors | ||
-------- | ||
|
||
- Vitaly Puzrin (Fontello project) | ||
|
||
|
||
Licence | ||
------- | ||
|
||
* Font provided under SIL license | ||
* Artworks provided under CC-BY licence | ||
|
||
Authors of each artwork are listed in contributors list, and in config.yml file. |
Oops, something went wrong.