Skip to content

Commit

Permalink
DOCS: Updates docs for OSX dev with fontforge (discourse#11956)
Browse files Browse the repository at this point in the history
`fondu` is no longer available via homebrew: `Error: fondu has been
disabled because it is not maintained upstream!` (since
Homebrew/homebrew-core#66396) and the `pkg` file available on `fondu`'s
site doesn't seem to work on Big Sur. An alternative option is to use
`fontforge`, which a little `python` script (it's definitely less short
an harder to read, but it works). Additionally, it looks like the file
*might* be called `ttc` instead.

I have also updated the URL for ImageMagick's `type_gen` because it now
lives under `legacy.imagemagick.org` which causes `curl` to capture a
301 page instead.
  • Loading branch information
iamricard authored Feb 4, 2021
1 parent 3cf5b4d commit 6f26365
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions docs/DEVELOPMENT-OSX-NATIVE.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,17 @@ ImageMagick is used for generating avatars (including for test fixtures).
brew install imagemagick
ImageMagick is going to want to use the Helvetica font to generate the
letter-avatars:
letter-avatars. To make it available we need to extract it from the system
fonts:
```sh
brew install fondu
brew install fontforge
cd ~/Library/Fonts
fondu /System/Library/Fonts/Helvetica.dfont
export HELVETICA_FONT=/System/Library/Fonts/Helvetica.ttc # The extension might be dfont instead
fontforge -c "[open(u'%s(%s)' % ('$HELVETICA_FONT', font)).generate('%s.ttf' % font) for font in fontsInFile('$HELVETICA_FONT')]"
mkdir ~/.magick
cd ~/.magick
curl https://www.imagemagick.org/Usage/scripts/imagick_type_gen > type_gen
curl https://legacy.imagemagick.org/Usage/scripts/imagick_type_gen > type_gen
find /System/Library/Fonts /Library/Fonts ~/Library/Fonts -name "*.[to]tf" | perl type_gen -f - > type.xml
cd /usr/local/Cellar/imagemagick/<version>/etc/ImageMagick-6
```
Expand Down

0 comments on commit 6f26365

Please sign in to comment.