X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mf%2Ffeta-autometric.mf;h=d5cbb7f2d5259a4115686280fe9a56185bd49c4a;hb=6353f0972b47829b4003763f5d73a79192cb248a;hp=77b551e30c5c2ef55ee18ff6f0a067264e871391;hpb=be9804f8347b5e8c9394136e64851a458ac1d09d;p=lilypond.git diff --git a/mf/feta-autometric.mf b/mf/feta-autometric.mf index 77b551e30c..d5cbb7f2d5 100644 --- a/mf/feta-autometric.mf +++ b/mf/feta-autometric.mf @@ -1,20 +1,31 @@ +% Feta (not the Font-En-Tja) music font -- administrative MF routines +% This file is part of LilyPond, the GNU music typesetter. % -% autometric.mf -- administrative MF routines +% Copyright (C) 1997--2011 Han-Wen Nienhuys +% Jan Nieuwenhuizen % -% source file of the Feta (not an acronym for Font-En-Tja) -% pretty-but-neat music font +% These macros help create ascii logging output +% to automate generation of the lily tables. +% The output should be parsed by the mf-to-table script. % -% (c) 1997--2004 Han-Wen Nienhuys -% Jan Nieuwenhuizen +% LilyPond is free software: you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation, either version 3 of the License, or +% (at your option) any later version. % -% these macros help create ascii logging output -% to automate generation of lily tables and tex backend -% The output should be parsed by the mf-to-table script +% LilyPond is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License +% along with LilyPond. If not, see . message "******************************************************"; message "Using feta Autometric macros."; -message "Do not worry about the @ signs in the output, they are not errors."; +message "order of messages: "; +message " NAME/CODE/BP/WD/DP/HT/WX/WY"; message "******************************************************"; message ""; @@ -23,7 +34,7 @@ message ""; def fet_beginfont (expr name, size, encod) = font_identifier := name & decimal size; font_size size; - font_coding_scheme encod; + font_coding_scheme "asis"; message "@{font@:GNU@:LilyPond@:" & name & "@:" & decimal size & "@:" & encod @@ -39,18 +50,23 @@ enddef; % group or table? def fet_begingroup (expr name) = - message "@{group@:" & name +begingroup; + save feta_group; + string feta_group; + + feta_group := name; + + message "@{group@:" & feta_group & "@}"; message ""; -begingroup enddef; def fet_endgroup (expr name) = -endgroup; message "@{puorg@:" & name & "@}"; message ""; +endgroup; enddef; @@ -61,7 +77,7 @@ def autometric_parameter (expr name, value) = enddef; -def autometric_output_char= +def autometric_output_char = message "@{char@:" & charnamestr & "@:" & decimal charcode & "@:" & decimal charbp @@ -119,13 +135,19 @@ def set_char_box (expr b_sharp, w_sharp, d_sharp, h_sharp) = charwx := charwd; charwy := 0; - % additions for mf2pt1 + % additions for mf2pt1 (`bbox' is called `glyph_dimensions' starting + % with version 2.4.2) if known bp_per_pixel: special "% MF2PT1: bbox " & to_bp (-b) & " " & to_bp (-d) & " " & to_bp (w) & " " & to_bp (h); + special "% MF2PT1: glyph_dimensions " + & to_bp (-b) & " " + & to_bp (-d) & " " + & to_bp (w) & " " + & to_bp (h); special "% MF2PT1: font_size " & decimal designsize; special "% MF2PT1: font_slant " & decimal font_slant_; @@ -163,7 +185,7 @@ enddef; def no_dimen_beginchar (expr c) = -begingroup +begingroup; charcode := if known c: byte c else: 0; fi; charic := 0; clearxy; @@ -174,7 +196,7 @@ enddef; % -% we leave the ctrl characters alone. +% we leave the ctrl characters alone % code := 32; @@ -196,6 +218,16 @@ def fet_beginchar (expr name, id_lit) = charnamestr := name; idstr := id_lit; + % addition for mf2pt1 + if known bp_per_pixel: + if known feta_group: + special "% MF2PT1: glyph_name " + & feta_group & "." & idstr; + else: + special "% MF2PT1: glyph_name " & idstr; + fi; + fi; + no_dimen_beginchar (incr code) name; enddef; @@ -223,11 +255,11 @@ def breapth_endchar = chardx := (w + b); % what the heck is chardx shipit; -endgroup +endgroup; enddef; -def fet_endchar= +def fet_endchar = autometric_output_char; breapth_endchar; enddef;