]> git.donarmstrong.com Git - lilypond.git/blobdiff - ps/lilyponddefs.ps
* lily/font-select.cc (properties_to_font_size_family): Fix
[lilypond.git] / ps / lilyponddefs.ps
index c0d15a1bb5bb64efc05d7e87a639989479a7bd59..ff80432b9f8697e6b6d73acfa2ca6f6d8b12c1db 100644 (file)
@@ -59,6 +59,32 @@ output-scale output-scale scale
        grestore
 } bind def
 
+%% http://bibliofile.mc.duke.edu/gww/fonts/postscript-utilities/encoding-vectors.html
+
+%/FONTLENGTH 256 bind def
+
+%<font> <encoding> <name> reencode-font
+/reencode-dict 5 dict def
+/reencode-font
+{
+    reencode-dict
+    begin
+    /name exch def
+    /encoding exch def
+    /base-font exch def
+    % note: Needs ps level 2
+    /font base-font maxlength dict def
+    base-font {
+        exch dup dup /FID ne exch /Encoding ne and
+        { exch font 3 1 roll put }
+        { pop pop } ifelse
+    } forall
+    font /FontName name put
+    font /Encoding encoding put
+    name font definefont pop
+    end
+} bind def
+
 /start-system % height
 {
        dup base-line-skip gt {