lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: separating flags from noteheads in font (issue4273119)


From: Janek Warchoł
Subject: Re: separating flags from noteheads in font (issue4273119)
Date: Thu, 16 Jun 2011 22:57:10 +0200

2011/6/14 Marc Hohl <address@hidden>:
> Am 13.06.2011 22:16, schrieb Janek Warchoł:
>>
>> 2011/6/13 Janek Warchoł<address@hidden>:
>>>
>>> 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@:address@hidden
[43]
@{char@:grace dash (up)@:44@:-0.0238@:-0.03307@:6.05882@:-2.80501@:-0.03307@:0@
:address@hidden [44]
@{char@:grace dash (down)@:45@:-0.0238@:-0.03307@:-2.77698@:5.7559@:-0.03307@:0
@:address@hidden [45]
@{puorg@:address@hidden
)
@{parameter@:staffsize@:address@hidden
@{parameter@:stafflinethickness@:address@hidden
@{parameter@:staff_space@:address@hidden
@{parameter@:linethickness@:address@hidden
@{parameter@:black_notehead_width@:address@hidden
@{parameter@:ledgerlinethickness@:address@hidden
@{parameter@:blot_diameter@:address@hidden
@address@hidden) )
(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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]