Commit d80aeebd4b2bc417f21b1317174a15cea2b50269

Darren Embry 2021-10-13T00:14:32

fix italic angle; rewrite conversion script in python

diff --git a/convert.py b/convert.py
new file mode 100755
index 0000000..63b15f9
--- /dev/null
+++ b/convert.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env fontforge
+# -*- mode: python; coding: utf-8 -*-
+
+import fontforge
+import os
+from datetime import datetime
+
+now = datetime.now()
+os.environ['SOURCE_DATE_EPOCH'] = now.strftime('%s')
+if os.environ['USER'] == 'dembry' or os.environ['USER'] == 'dse':
+    os.environ['USER'] = 'Darren Embry'
+
+MACSTYLE_BOLD      = 1
+MACSTYLE_ITALIC    = 2
+MACSTYLE_UNDERLINE = 4
+MACSTYLE_OUTLINE   = 8
+MACSTYLE_SHADOW    = 16
+MACSTYLE_CONDENSED = 32
+MACSTYLE_EXTENDED  = 64
+
+extensions = ['ttf', 'otf', 'svg', 'woff', 'woff2']
+
+def roman():
+    print('==> sources/cour.pfa <==')
+    font = fontforge.open('sources/cour.pfa')
+    font.fontname   = 'IBMCourier'
+    font.fullname   = 'IBM Courier'
+    font.familyname = 'IBM Courier'
+    font.italicangle = 0.0
+    font.save('sfd/IBM-Courier.sfd')
+    for extension in extensions:
+        font.generate('fonts/IBM-Courier.' + extension)
+def bold():
+    print('==> sources/courb.pfa <==')
+    font = fontforge.open('sources/courb.pfa')
+    font.fontname   = 'IBMCourier-Bold'
+    font.fullname   = 'IBM Courier Bold'
+    font.familyname = 'IBM Courier'
+    font.italicangle = 0.0
+    font.save('sfd/IBM-Courier-Bold.sfd')
+    for extension in extensions:
+        font.generate('fonts/IBM-Courier-Bold.' + extension)
+def italic():
+    print('==> sources/couri.pfa <==')
+    font = fontforge.open('sources/couri.pfa')
+    font.fontname   = 'IBMCourier-Italic'
+    font.fullname   = 'IBM Courier Italic'
+    font.familyname = 'IBM Courier'
+    font.italicangle = -12.0
+    font.save('sfd/IBM-Courier-Italic.sfd')
+    for extension in extensions:
+        font.generate('fonts/IBM-Courier-Italic.' + extension)
+def boldItalic():
+    print('==> sources/courbi.pfa <==')
+    font = fontforge.open('sources/courbi.pfa')
+    font.fontname   = 'IBMCourier-BoldItalic'
+    font.fullname   = 'IBM Courier Bold Italic'
+    font.familyname = 'IBM Courier'
+    font.italicangle = -12.0
+    font.save('sfd/IBM-Courier-Bold-Italic.sfd')
+    for extension in extensions:
+        font.generate('fonts/IBM-Courier-Bold-Italic.' + extension)
+
+roman()
+bold()
+italic()
+boldItalic()
diff --git a/convert.sh b/convert.sh
deleted file mode 100755
index 921f332..0000000
--- a/convert.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env bash
-set -o errexit
-set -o pipefail
-set -o nounset
-
-mkdir -p sfd
-
-export SOURCE_DATE_EPOCH="$(date +%s)"
-if [[ "$USER" = "dembry" ]] || [[ "$USER" = "dse" ]] ; then
-    export USER="Darren Embry"
-fi
-
-ffconvert --font-name='IBMCourier'              \
-          --full-name='IBM Courier'             \
-          --family-name='IBM Courier'            \
-          --weight='Regular'                    \
-          sources/cour.pfa                      \
-          sfd/IBM-Courier.sfd                   \
-          fonts/IBM-Courier.svg                 \
-          fonts/IBM-Courier.ttf                 \
-          fonts/IBM-Courier.otf                 \
-          fonts/IBM-Courier.woff                \
-          fonts/IBM-Courier.woff2
-ffconvert --font-name='IBMCourier-Bold'         \
-          --full-name='IBM Courier Bold'        \
-          --family-name='IBM Courier'            \
-          --weight='Bold'                       \
-          sources/courb.pfa                     \
-          sfd/IBM-Courier-Bold.sfd              \
-          fonts/IBM-Courier-Bold.svg            \
-          fonts/IBM-Courier-Bold.ttf            \
-          fonts/IBM-Courier-Bold.otf            \
-          fonts/IBM-Courier-Bold.woff           \
-          fonts/IBM-Courier-Bold.woff2
-ffconvert --font-name='IBMCourier-Italic'       \
-          --full-name='IBM Courier Italic'      \
-          --family-name='IBM Courier'            \
-          --weight='Regular'                    \
-          sources/couri.pfa                     \
-          sfd/IBM-Courier-Italic.sfd            \
-          fonts/IBM-Courier-Italic.svg          \
-          fonts/IBM-Courier-Italic.ttf          \
-          fonts/IBM-Courier-Italic.otf          \
-          fonts/IBM-Courier-Italic.woff         \
-          fonts/IBM-Courier-Italic.woff2
-ffconvert --font-name='IBMCourier-BoldItalic'   \
-          --full-name='IBM Courier Bold Italic' \
-          --family-name='IBM Courier'            \
-          --weight='Bold'                       \
-          sources/courbi.pfa                    \
-          sfd/IBM-Courier-Bold-Italic.sfd       \
-          fonts/IBM-Courier-Bold-Italic.svg     \
-          fonts/IBM-Courier-Bold-Italic.ttf     \
-          fonts/IBM-Courier-Bold-Italic.otf     \
-          fonts/IBM-Courier-Bold-Italic.woff    \
-          fonts/IBM-Courier-Bold-Italic.woff2
diff --git a/fonts/IBM-Courier-Bold-Italic.otf b/fonts/IBM-Courier-Bold-Italic.otf
old mode 100644
new mode 100755
index df0df31..8eff4ae
Binary files a/fonts/IBM-Courier-Bold-Italic.otf and b/fonts/IBM-Courier-Bold-Italic.otf differ
diff --git a/fonts/IBM-Courier-Bold-Italic.svg b/fonts/IBM-Courier-Bold-Italic.svg
index 973831b..442e14d 100644
--- a/fonts/IBM-Courier-Bold-Italic.svg
+++ b/fonts/IBM-Courier-Bold-Italic.svg
@@ -2,7 +2,7 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
 <metadata>
-Created by FontForge 20200314 at Fri Feb 14 00:00:00 1992
+Created by FontForge 20201107 at Tue Oct 12 20:13:38 2021
  By Darren Embry
 Copyright (c) IBM Corporation 1990,1991.
 </metadata>
@@ -22,7 +22,7 @@ Copyright (c) IBM Corporation 1990,1991.
     bbox="-48 -288 860 839"
     underline-thickness="50"
     underline-position="-100"
-    slope="-16"
+    slope="-12"
     stemh=" 85 "
     stemv=" 87 "
     unicode-range="U+0020-FB04"
diff --git a/fonts/IBM-Courier-Bold-Italic.ttf b/fonts/IBM-Courier-Bold-Italic.ttf
old mode 100644
new mode 100755
index 2c67fee..d99bbfa
Binary files a/fonts/IBM-Courier-Bold-Italic.ttf and b/fonts/IBM-Courier-Bold-Italic.ttf differ
diff --git a/fonts/IBM-Courier-Bold-Italic.woff b/fonts/IBM-Courier-Bold-Italic.woff
index bae3d4e..a5ab5e2 100644
Binary files a/fonts/IBM-Courier-Bold-Italic.woff and b/fonts/IBM-Courier-Bold-Italic.woff differ
diff --git a/fonts/IBM-Courier-Bold-Italic.woff2 b/fonts/IBM-Courier-Bold-Italic.woff2
index 4c7fec0..9fc744a 100644
Binary files a/fonts/IBM-Courier-Bold-Italic.woff2 and b/fonts/IBM-Courier-Bold-Italic.woff2 differ
diff --git a/fonts/IBM-Courier-Bold.otf b/fonts/IBM-Courier-Bold.otf
old mode 100644
new mode 100755
index 7ee9105..6740df5
Binary files a/fonts/IBM-Courier-Bold.otf and b/fonts/IBM-Courier-Bold.otf differ
diff --git a/fonts/IBM-Courier-Bold.svg b/fonts/IBM-Courier-Bold.svg
index 8074308..b18d4fa 100644
--- a/fonts/IBM-Courier-Bold.svg
+++ b/fonts/IBM-Courier-Bold.svg
@@ -2,7 +2,7 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
 <metadata>
-Created by FontForge 20200314 at Fri Feb 14 00:00:00 1992
+Created by FontForge 20201107 at Tue Oct 12 20:13:38 2021
  By Darren Embry
 Copyright (c) IBM Corporation 1990,1991.
 </metadata>
diff --git a/fonts/IBM-Courier-Bold.ttf b/fonts/IBM-Courier-Bold.ttf
old mode 100644
new mode 100755
index de94e8c..7ce173a
Binary files a/fonts/IBM-Courier-Bold.ttf and b/fonts/IBM-Courier-Bold.ttf differ
diff --git a/fonts/IBM-Courier-Bold.woff b/fonts/IBM-Courier-Bold.woff
index b1bbbb9..f721bee 100644
Binary files a/fonts/IBM-Courier-Bold.woff and b/fonts/IBM-Courier-Bold.woff differ
diff --git a/fonts/IBM-Courier-Bold.woff2 b/fonts/IBM-Courier-Bold.woff2
index 8ad3745..4a89c13 100644
Binary files a/fonts/IBM-Courier-Bold.woff2 and b/fonts/IBM-Courier-Bold.woff2 differ
diff --git a/fonts/IBM-Courier-Italic.otf b/fonts/IBM-Courier-Italic.otf
old mode 100644
new mode 100755
index c546a7b..48beec3
Binary files a/fonts/IBM-Courier-Italic.otf and b/fonts/IBM-Courier-Italic.otf differ
diff --git a/fonts/IBM-Courier-Italic.svg b/fonts/IBM-Courier-Italic.svg
index bf5d698..597f62e 100644
--- a/fonts/IBM-Courier-Italic.svg
+++ b/fonts/IBM-Courier-Italic.svg
@@ -2,7 +2,7 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
 <metadata>
-Created by FontForge 20200314 at Fri Feb 14 00:00:00 1992
+Created by FontForge 20201107 at Tue Oct 12 20:13:38 2021
  By Darren Embry
 Copyright (c) IBM Corporation 1990,1991.
 </metadata>
@@ -22,7 +22,7 @@ Copyright (c) IBM Corporation 1990,1991.
     bbox="-48 -288 800 841"
     underline-thickness="50"
     underline-position="-100"
-    slope="-16"
+    slope="-12"
     stemh=" 47 "
     stemv=" 50 "
     unicode-range="U+0020-FB04"
diff --git a/fonts/IBM-Courier-Italic.ttf b/fonts/IBM-Courier-Italic.ttf
old mode 100644
new mode 100755
index 3bc58bb..c0ca11a
Binary files a/fonts/IBM-Courier-Italic.ttf and b/fonts/IBM-Courier-Italic.ttf differ
diff --git a/fonts/IBM-Courier-Italic.woff b/fonts/IBM-Courier-Italic.woff
index 91cd372..73b26bd 100644
Binary files a/fonts/IBM-Courier-Italic.woff and b/fonts/IBM-Courier-Italic.woff differ
diff --git a/fonts/IBM-Courier-Italic.woff2 b/fonts/IBM-Courier-Italic.woff2
index d3e1cc8..e78108b 100644
Binary files a/fonts/IBM-Courier-Italic.woff2 and b/fonts/IBM-Courier-Italic.woff2 differ
diff --git a/fonts/IBM-Courier.otf b/fonts/IBM-Courier.otf
old mode 100644
new mode 100755
index 3efd4c5..d29d68e
Binary files a/fonts/IBM-Courier.otf and b/fonts/IBM-Courier.otf differ
diff --git a/fonts/IBM-Courier.svg b/fonts/IBM-Courier.svg
index f4ef2fc..bb32788 100644
--- a/fonts/IBM-Courier.svg
+++ b/fonts/IBM-Courier.svg
@@ -2,7 +2,7 @@
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
 <metadata>
-Created by FontForge 20200314 at Fri Feb 14 00:00:00 1992
+Created by FontForge 20201107 at Tue Oct 12 20:13:38 2021
  By Darren Embry
 Copyright (c) IBM Corporation 1990,1991.
 </metadata>
diff --git a/fonts/IBM-Courier.ttf b/fonts/IBM-Courier.ttf
old mode 100644
new mode 100755
index 125eb3f..88b8416
Binary files a/fonts/IBM-Courier.ttf and b/fonts/IBM-Courier.ttf differ
diff --git a/fonts/IBM-Courier.woff b/fonts/IBM-Courier.woff
index be1fef6..a7ea86d 100644
Binary files a/fonts/IBM-Courier.woff and b/fonts/IBM-Courier.woff differ
diff --git a/fonts/IBM-Courier.woff2 b/fonts/IBM-Courier.woff2
index 58cfafd..fe521ad 100644
Binary files a/fonts/IBM-Courier.woff2 and b/fonts/IBM-Courier.woff2 differ
diff --git a/sfd/IBM-Courier-Bold-Italic.sfd b/sfd/IBM-Courier-Bold-Italic.sfd
index 9b1138a..4461e83 100755
--- a/sfd/IBM-Courier-Bold-Italic.sfd
+++ b/sfd/IBM-Courier-Bold-Italic.sfd
@@ -5,7 +5,7 @@ FamilyName: IBM Courier
 Weight: Bold
 Copyright: Copyright (c) IBM Corporation 1990,1991.
 Version: 001.003
-ItalicAngle: -16
+ItalicAngle: -12
 UnderlinePosition: -100
 UnderlineWidth: 50
 Ascent: 800
@@ -18,8 +18,8 @@ UniqueID: 263789
 OS2Version: 0
 OS2_WeightWidthSlopeOnly: 0
 OS2_UseTypoMetrics: 0
-CreationTime: 1634098383
-ModificationTime: 1634098383
+CreationTime: 1634084018
+ModificationTime: 1634084018
 OS2TypoAscent: 0
 OS2TypoAOffset: 1
 OS2TypoDescent: 0
diff --git a/sfd/IBM-Courier-Bold.sfd b/sfd/IBM-Courier-Bold.sfd
index 09b90f6..5fb5390 100755
--- a/sfd/IBM-Courier-Bold.sfd
+++ b/sfd/IBM-Courier-Bold.sfd
@@ -18,8 +18,8 @@ UniqueID: 263788
 OS2Version: 0
 OS2_WeightWidthSlopeOnly: 0
 OS2_UseTypoMetrics: 0
-CreationTime: 1634098383
-ModificationTime: 1634098383
+CreationTime: 1634084018
+ModificationTime: 1634084018
 OS2TypoAscent: 0
 OS2TypoAOffset: 1
 OS2TypoDescent: 0
diff --git a/sfd/IBM-Courier-Italic.sfd b/sfd/IBM-Courier-Italic.sfd
index dbea98a..14cfeca 100755
--- a/sfd/IBM-Courier-Italic.sfd
+++ b/sfd/IBM-Courier-Italic.sfd
@@ -5,7 +5,7 @@ FamilyName: IBM Courier
 Weight: Regular
 Copyright: Copyright (c) IBM Corporation 1990,1991.
 Version: 001.003
-ItalicAngle: -16
+ItalicAngle: -12
 UnderlinePosition: -100
 UnderlineWidth: 50
 Ascent: 800
@@ -18,8 +18,8 @@ UniqueID: 263787
 OS2Version: 0
 OS2_WeightWidthSlopeOnly: 0
 OS2_UseTypoMetrics: 0
-CreationTime: 1634098383
-ModificationTime: 1634098383
+CreationTime: 1634084018
+ModificationTime: 1634084018
 OS2TypoAscent: 0
 OS2TypoAOffset: 1
 OS2TypoDescent: 0
diff --git a/sfd/IBM-Courier.sfd b/sfd/IBM-Courier.sfd
index 983c9e6..0b8817a 100755
--- a/sfd/IBM-Courier.sfd
+++ b/sfd/IBM-Courier.sfd
@@ -18,8 +18,8 @@ UniqueID: 263786
 OS2Version: 0
 OS2_WeightWidthSlopeOnly: 0
 OS2_UseTypoMetrics: 0
-CreationTime: 1634098383
-ModificationTime: 1634098383
+CreationTime: 1634084018
+ModificationTime: 1634084018
 OS2TypoAscent: 0
 OS2TypoAOffset: 1
 OS2TypoDescent: 0