File: INSTALL-git.md

package info (click to toggle)
fontforge 1:20170731~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 67,252 kB
  • ctags: 42,582
  • sloc: ansic: 580,893; python: 5,476; sh: 3,081; makefile: 1,269; perl: 315; cpp: 176; ruby: 97; objc: 92; xml: 90; sed: 9
file content (172 lines) | stat: -rw-r--r-- 5,213 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Installing FontForge from Git Source Code

## Doing It By Hand

Clone a copy of the Github source repository:

```sh
mkdir -p ~/src/github.com/fontforge;
cd ~/src/github.com/fontforge;
git clone https://github.com/fontforge/fontforge.git;
```

Install all your typical build tools, build dependencies and runtime dependencies - all the packages that allow you to build of software from source code.
The exact method to do this depends on your OS distribution.
You can see a list of the dependencies for Debian in the [debian/control](https://github.com/fontforge/fontforge/blob/master/debian/control) file, or to generate a list on Debian-like systems with `aptitude` installed, run `sudo ./debian/deb-build-dep`

To download all dependencies on Debian Jessie, run:

```sh
sudo apt-get install autotools-dev libjpeg-dev libtiff5-dev libpng-dev libgif-dev libxt-dev libfreetype6-dev autoconf automake libtool libltdl7-dev libxml2-dev libuninameslist-dev libspiro-dev python-dev libpango1.0-dev libcairo2-dev chrpath
```

To download all dependencies on Ubuntu, run:

```sh
sudo apt-get install packaging-dev pkg-config python-dev libpango1.0-dev libglib2.0-dev libxml2-dev giflib-dbg libjpeg-dev libtiff-dev uthash-dev libspiro-dev build-essential automake flex bison;
```

Install the *unifont* package to get a full display of the reference glyphs.
[Unifont] (http://savannah.gnu.org/projects/unifont) includes glyphs for all Unicode codepoints, and FontForge will use it if it is installed.

```sh
sudo apt-get install unifont;
```

FontForge uses *[libspiro](http://github.com/fontforge/libspiro)* to simplify the drawing of curves.
Download and install the latest code like this:

```
git clone https://github.com/fontforge/libspiro.git
cd libspiro
autoreconf -i
automake --foreign -Wall
./configure
make
sudo make install
cd ..
```

Build *libuninameslist*

FontForge uses [libuninameslist] (http://github.com/fontforge/libuninameslist) to access attribute data about each Unicode code point.

Download the code:

```
git clone https://github.com/fontforge/libuninameslist.git
```

Run the following commands in sequence (that is, wait for each one to complete before running the next):

```
cd libuninameslist
autoreconf -i
automake --foreign
./configure
make
sudo make install
cd ..
```

Now run the build and installation scripts, and ensure you can open shared object files:

```sh
cd fontforge;
./bootstrap;
./configure;
make;
sudo make install;
sudo ldconfig;
```

**Attention, Designers Who Love TrueType Hinting:** 
You like to run `./configure` with the `--with-freetype-source` option. 
This option enables advanced features for debugging TrueType font hints, such as stepping through hinting instructions one by one.

## Common Problems

* If you can not install due to problems with Python, run ```./configure``` line like this (paths may vary):
```
PYTHON_CFLAGS="-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7" \
PYTHON_LIBS="-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config" \
./configure \
--disable-programs \
--disable-native-scripting \
--without-x \
--without-cairo \
--without-giflib \
--without-libjpeg \
--without-libtiff \
--without-libpng \
--without-libspiro \
--without-libuninameslist \
--without-libunicodenames \
--without-iconv \
--without-libzmq \
--without-libreadline \
--enable-python-scripting \
--enable-python-extension;
```
Or try this:
```sh
PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ \
PYTHON_CFLAGS="-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7" \
PYTHON_LIBS="-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config" \
./configure;
```

* Problems with lack of libraries can be solved with Homebrew or similar systems:
```
brew install autoconf;
brew install automake;
brew install glib;
brew install pango;
```

* If `make` fails with `no such file or directory msgfmt` then with Homebrew run:
```
brew install gettext;
```
Then edit then your shell profile (eg, `~/.bash_profile` or `~/.zprofile`) and add:
```
export PATH=${PATH}:/usr/local/opt/gettext/bin
```

## On Mac OS X with Homebrew

Homebrew no longer packages FontForge with a UI, but the release GUI app bundles are available from Cask. 
You can install FontForge from the current github source code using a package manager, such as MacPorts or Fink. 

Here is how to install FontForge without a UI:

```
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
**Check everything's ok** (fix any issues before moving on)
```
brew doctor
```
**Install dependencies**
```
brew install python gettext libpng jpeg libtiff giflib cairo pango libspiro czmq fontconfig automake libtool pkg-config glib pango
```

**Install the latest release or build from source**  
Release:
```
brew install -v --debug --with-giflib --with-libspiro fontforge
```
Source:
```
brew install -v --debug --with-giflib --with-libspiro fontforge --HEAD
```

If this does not work, please [file an issue](When_Things_Go_Wrong_With_Fontforge_Itself)

To install the UI with Cask:

```
brew tap caskroom/cask; # Install cask
brew cask install fontforge; # Install fontforge
```