2011/6/14 Marc Hohl <m...@hohlart.de>:
> Am 13.06.2011 22:16, schrieb Janek Warchoł:
>>
>> 2011/6/13 Janek Warchoł<lemniskata.bernoull...@gmail.com>:
>>>
>>> Bad news: it doesn't work (the flags are squashed)
>>
>> An idea came to my mind - maybe we can use our *.table files in
>> feta-flags?
>> Is it possible to tell our build system to compile feta-noteheads
>> first and feta-flags (which would contain a reference to
>> feta-noteheads.otf-gtable) second? Is this viable?
>
> I don't know. I searched through the source files,
> and IIUC black_notehead_width depends on the function draw_outside_ellipse
> (defined in feta-noteheads.mf) and the puff_up_factor (defined in
> feta-params.mf).
>
> So while you are restructuring the metafont files anyway (well, kind of),
> would it make sense to collect the drawing functions like
> draw_outside_ellipse
> in another file, perhaps feta-routines.mf?
>
> Then you could include that file in both feta-noteheads.mf and feta-flags.mf
> and call draw_outside_ellipse to compute the value of black_notehead_width.
>
> I think this is easier to maintain than forcing an order in which the files
> are handled during the build process, and it makes testing more easy,
> because
> the files are handled independently.
>
> But this looks like a whole lot of work ... :-(

I don't think it would be too much work, but we will still have a problem:
if we move draw_outside_ellipse to feta-routines.mf and included that file
in both feta-flags and feta-noteheads, how will we ensure that
it will be called with the same parameters every time? (i.e. if someone
decides to change black notehead by tweaking the parameters of
draw_outside_ellipse in feta-noteheads, he may forget to change
its parameters in feta-flags. And even if he won't forget, it's still a non
elegant solution) We can solve this by moving these parameters
to feta-routines too, but then we will have noteheads' parameters
in two different places.
Still, if we won't find a better way i think we can do it like that.
I tried how will it work, but it doesn't compile as for now (see below).
I attach a patch if anyone wants to try it (Rietveld issue updated also).

thanks,
Janek

add_flag->...);foot_wid_ratio=xpart(rel_foot)/wid;
                                                  hip_dep_ratio=hip_dep/dep;...
l.495             hip_thickness, foot_thickness)
                                        ;
>> 0
! Division by zero.
<to be read again>
                   ;
add_flag->...);foot_wid_ratio=xpart(rel_foot)/wid;
                                                  hip_dep_ratio=hip_dep/dep;...
l.497             hip_thickness, foot_thickness)
                                        ;
@{char@:128th (down)@:43@:0@:-0.03307@:0.27606@:15.5677@:-0.03307@:0@:d7@}
[43]
@{char@:grace dash (up)@:44@:-0.0238@:-0.03307@:6.05882@:-2.80501@:-0.03307@:0@
:ugrace@} [44]
@{char@:grace dash (down)@:45@:-0.0238@:-0.03307@:-2.77698@:5.7559@:-0.03307@:0
@:dgrace@} [45]
@{puorg@:flags@}
)
@{parameter@:staffsize@:11.22@}
@{parameter@:stafflinethickness@:0.42471@}
@{parameter@:staff_space@:2.80501@}
@{parameter@:linethickness@:0.42471@}
@{parameter@:black_notehead_width@:8.41502@}
@{parameter@:ledgerlinethickness@:0.84943@}
@{parameter@:blot_diameter@:0.4@}
@{tnof@}) )
(see the transcript file for additional information)
Font metrics written on feta-flags11.tfm.
Output written on feta-flags11.600gf (13 characters, 2508 bytes).
Transcript written on feta-flags11.log.
make[1]: *** [out/feta-flags11.log] Error 1
make[1]: Leaving directory `/home/janek/lilypond-git/build/mf'
make: *** [all] Error 2

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to