File: build_italic

package info (click to toggle)
fonts-junicode 2%2Bgit20230104%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 114,100 kB
  • sloc: python: 162; sh: 119; xml: 18; makefile: 16
file content (59 lines) | stat: -rwxr-xr-x 1,123 bytes parent folder | download
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
#!/bin/bash

outputtype="ttf"

instanceparam="-i"

generateufo=true

xslfile="fix_wdth_axis.xsl"

for arg in $@
do
  if [ $arg == "otf" ]
  then
    outputtype=$arg
  elif [ $arg == "variable" ]
  then
    outputtype=$arg
    instanceparam=""
  elif [ $arg == "variable-cff2" ]
  then
    outputtype=$arg
    instanceparam=""
  elif [ $arg == "u" ]
  then
    generateufo=false
  elif [ $arg == "s"  ]
  then
    xslfile="fix_wdth_axis-shorter.xsl"
fi

done

if [ "$generateufo" = true ]
then
  echo "Generating UFOs and designspace file from Glyphs source"
  glyphs2ufo --no-preserve-glyphsapp-metadata --propagate-anchors --generate-GDEF \
   --write-public-skip-export-glyphs Junicode-Italic.glyphs
  if [ $? -ne 0 ]
  then
    echo "glyphs2ufo failed"
    exit 1
  fi
  echo "Cleaning up designspace file"
  xsltproc -o Junicode-Italic-fixed.designspace $xslfile Junicode-Italic.designspace
  if [ $? -ne 0 ]
  then
   echo "xsltproc failed"
   exit 1
  fi
fi

echo "building font(s)"
fontmake -o $outputtype $instanceparam -m "Junicode-Italic-fixed.designspace"
if [ $? -ne 0 ]
then
 echo "fontmake failed"
 exit 1
fi