DOCS: Updates docs for OSX dev with fontforge (#11956)

`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.
This commit is contained in:
Ricard Solé 2021-02-04 23:28:10 +01:00 committed by GitHub
parent 3cf5b4dde1
commit 6f263653c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -183,15 +183,17 @@ ImageMagick is used for generating avatars (including for test fixtures).
brew install imagemagick brew install imagemagick
ImageMagick is going to want to use the Helvetica font to generate the 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 ```sh
brew install fondu brew install fontforge
cd ~/Library/Fonts 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 mkdir ~/.magick
cd ~/.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 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 cd /usr/local/Cellar/imagemagick/<version>/etc/ImageMagick-6
``` ```