]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/auxiliar/pfx2ttf-mono.fontforge
Add sans-serif and monospace fonts
[lilypond.git] / scripts / auxiliar / pfx2ttf-mono.fontforge
diff --git a/scripts/auxiliar/pfx2ttf-mono.fontforge b/scripts/auxiliar/pfx2ttf-mono.fontforge
new file mode 100644 (file)
index 0000000..7b80494
--- /dev/null
@@ -0,0 +1,36 @@
+Open($1);
+MergeKern($2)
+
+
+# The AFM files of `New Century Schoolbook' family as distributed within the
+# urw-fonts-1.0.7pre41.tar.bz2 archive contain a bunch of ligatures which
+# shouldn't be active by default:
+#
+#   T + M -> trademark
+#   N + o -> afii61352
+#   i + j -> ij
+#   I + J -> IJ
+#
+# This font bundle is shipped by Fedora Core 6 and other GNU/Linux
+# distributions; we simply remove those ligatures.
+
+# Monospace font shouldn't have these ligature.
+#
+#   f + i -> fi
+#   f + l -> fl
+
+SelectIf("trademark", "trademark", \
+         "afii61352", "afii61352", \
+         "ij", "ij", \
+         "IJ", "IJ", \
+        "fi", "fi", \
+        "fl", "fl");
+if (Strtol($version) < 20070501)
+  RemoveATT("Ligature", "*", "*");
+else
+  RemovePosSub("*");
+endif
+
+Generate($3 + $fontname + ".otf");
+
+# EOF