Re: separating flags from noteheads in font (issue4273119)

2011-06-26 Thread lemniskata . bernoullego

This is now abandoned; a new (working) version was created by Carl here:
http://codereview.appspot.com/4662055/
(google code issue 1709)

cheers,
Janek

http://codereview.appspot.com/4273119/

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


Re: separating flags from noteheads in font (issue4273119)

2011-06-17 Thread Marc Hohl

Am 16.06.2011 23:19, schrieb Carl Sorensen:



On 6/16/11 2:57 PM, "Janek Warchoł"
wrote:


2011/6/14 Marc Hohl:

Am 13.06.2011 22:16, schrieb Janek Warchoł:

2011/6/13 Janek Warchoł:

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.

I agree with Janek's concern.  I think that black-notehead-width is properly
set in feta-noteheads.  And the proper solution is to make that value
global.

You are right. My proposal is still not completely consistent.

I'll spend some time on the airplane this week (I'm going to a conference in
Hawaii -- poor me ;) )

:-)


to see if I can figure out how to get
black-notehead-width global.


That would be great!

Regards,

Marc

Thanks,

Carl





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


Re: separating flags from noteheads in font (issue4273119)

2011-06-16 Thread Carl Sorensen



On 6/16/11 2:57 PM, "Janek Warchoł" 
wrote:

> 2011/6/14 Marc Hohl :
>> Am 13.06.2011 22:16, schrieb Janek Warchoł:
>>> 
>>> 2011/6/13 Janek Warchoł:
 
 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.

I agree with Janek's concern.  I think that black-notehead-width is properly
set in feta-noteheads.  And the proper solution is to make that value
global.

I'll spend some time on the airplane this week (I'm going to a conference in
Hawaii -- poor me ;) ) to see if I can figure out how to get
black-notehead-width global.

Thanks,

Carl


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


Re: separating flags from noteheads in font (issue4273119)

2011-06-16 Thread Janek Warchoł
2011/6/14 Marc Hohl :
> Am 13.06.2011 22:16, schrieb Janek Warchoł:
>>
>> 2011/6/13 Janek Warchoł:
>>>
>>> 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.

   ;
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


Re: separating flags from noteheads in font (issue4273119)

2011-06-16 Thread Janek Warchoł
W dniu 15 czerwca 2011 15:52 użytkownik Carl Sorensen
 napisał:
> On 6/13/11 1:17 PM, "Janek Warchoł" 
> wrote:
>> we are back to the same question: how to pass
>> black_notehead_width to feta-flags from feta-noteheads.
>
> Have you tried eliminating the "numeric black_notehead_width;" line from
> feta-noteheads.mf and adding it to feta-generic.mf?

I tried it, but it doesn't work.

thanks,
Janek

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


Re: separating flags from noteheads in font (issue4273119)

2011-06-15 Thread Carl Sorensen
On 6/13/11 1:17 PM, "Janek Warchoł" 
wrote:

> Bad news: it doesn't work (the flags are squashed) - i have no idea
> why... Maybe i forgot to make clean when i tested it before, but i'm
> almost sure i didn't. Still, this looks like the only possible
> explanation.
> Mike tested it too and he got flags as squashed as attached; the only
> person who reports to have everything ok is Colin - that's weird...
> Seems we are back to the same question: how to pass
> black_notehead_width to feta-flags from feta-noteheads.

Have you tried eliminating the "numeric black_notehead_width;" line from
feta-noteheads.mf and adding it to feta-generic.mf?

I haven't tried this, but this is the direction I would go.

HTH,

Carl


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


Re: separating flags from noteheads in font (issue4273119)

2011-06-14 Thread Marc Hohl

Am 13.06.2011 22:16, schrieb Janek Warchoł:

2011/6/13 Janek Warchoł:

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 ... :-(

Just my 2ct,

Marc


cheers,
Janek

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



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


Re: separating flags from noteheads in font (issue4273119)

2011-06-13 Thread Colin Campbell

On 11-06-13 01:17 PM, Janek Warchoł wrote:

Bad news: it doesn't work (the flags are squashed) - i have no idea
why... Maybe i forgot to make clean when i tested it before, but i'm
almost sure i didn't. Still, this looks like the only possible
explanation.
Mike tested it too and he got flags as squashed as attached; the only
person who reports to have everything ok is Colin - that's weird...
Seems we are back to the same question: how to pass
black_notehead_width to feta-flags from feta-noteheads.

cheers,
Janek



To be clear: I was only reporting that the patch applied cleanly to my 
local build of lilypond, and that running make check showed no obvious 
problems.  I made no attempt to assess whether the patch actually *did* 
anything, only to see if it would curdle milk, bother the cat and do 
other nasty things.


Colin

--
A chief event of life is the day in which we have encountered a mind
that startled us.
 -Ralph Waldo Emerson, writer and philosopher (1803-1882)


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


Re: separating flags from noteheads in font (issue4273119)

2011-06-13 Thread Janek Warchoł
2011/6/13 Janek Warchoł :
> 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?

cheers,
Janek

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


Re: separating flags from noteheads in font (issue4273119)

2011-06-10 Thread lemzwerg

LGTM.

http://codereview.appspot.com/4273119/

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


Re: separating flags from noteheads in font (issue4273119)

2011-06-10 Thread lemniskata . bernoullego

2011/6/11  :

Looks good, but untested.  I'll test it when I can.


Ok. Don't forget to make clean in build/mf - there are still missing
dependencies.

Thanks!


http://codereview.appspot.com/4273119/diff/3001/mf/feta-noteheads.mf
File mf/feta-noteheads.mf (right):

http://codereview.appspot.com/4273119/diff/3001/mf/feta-noteheads.mf#newcode45
mf/feta-noteheads.mf:45: numeric black_notehead_width;
On 2011/06/10 23:12:15, Carl wrote:

Perhaps a comment here to indicate that we have deliberately *not*

used a save

statement for black_notehead_width in order to allow it to be a global

variable

available for other .mf files.  This will help keep people from saying

"Hey --

good practice says to make local variables; let's make it local"


Done.

http://codereview.appspot.com/4273119/

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


Re: separating flags from noteheads in font (issue4273119)

2011-06-10 Thread Carl . D . Sorensen

Looks good, but untested.  I'll test it when I can.


http://codereview.appspot.com/4273119/diff/3001/mf/feta-noteheads.mf
File mf/feta-noteheads.mf (right):

http://codereview.appspot.com/4273119/diff/3001/mf/feta-noteheads.mf#newcode45
mf/feta-noteheads.mf:45: numeric black_notehead_width;
Perhaps a comment here to indicate that we have deliberately *not* used
a save statement for black_notehead_width in order to allow it to be a
global variable available for other .mf files.  This will help keep
people from saying "Hey -- good practice says to make local variables;
let's make it local"

http://codereview.appspot.com/4273119/

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


Re: separating flags from noteheads in font (issue4273119)

2011-06-10 Thread lemniskata . bernoullego

with Carl's help, new patch set was uploaded. Now the flags aren't
squished, so it's perhaps ready to go :)

http://codereview.appspot.com/4273119/

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


Re: separating flags from noteheads in font (issue4273119)

2011-03-27 Thread Janek Warchoł
2011/3/27 Carl Sorensen :
>
> On 3/26/11 5:01 PM, "lemniskata.bernoull...@gmail.com"
>  wrote:
>
>> Unfortunetely there is a strange error: flags are now horizontally
>> squished (despite calling "make clean" before "make"), see
>> http://img829.imageshack.us/i/screenshotpxx.png/
>> Why this happened?
>
> I suspect that there are some constants that are set in the original file
> that you haven't copied to the new file.  I had that problem when I moved
> the shape note heads.

I see it now: black_notehead_width is defined in line 349 of
feta-noteheads.mf, it is also mentioned at the end of that file.
Unfortuantely it's not defined using some given value (or explicit
formula), but as a result of glyph drawing operation, namely drawing
black notehead.
(In other words: variable black_notehead_width depends on how notehead
is designed, not the other way round.)
Because of that i don't know how to extract this value from
feta-noteheads to feta-flags, my knowledge of Metafont is too limited
:(
Does anyone know how to do this?

thanks,
Janek

___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: separating flags from noteheads in font (issue4273119)

2011-03-26 Thread Carl Sorensen



On 3/26/11 5:01 PM, "lemniskata.bernoull...@gmail.com"
 wrote:

> Reviewers: ,
> 
> Message:
> Hi,
> 
> we are going to have multiple variants of each flag, fine-tuned to fit
> particular stem lengths. This means LOTS of flag glyphs.
> When experimenting some time ago i discovered that adding too many
> glyphs results in error. I suppose it means there's a limit of how many
> glyphs can be in a file, so i decided to separate flag glyphs from
> notehead glyphs. This is my attempt to do so.
> Unfortunetely there is a strange error: flags are now horizontally
> squished (despite calling "make clean" before "make"), see
> http://img829.imageshack.us/i/screenshotpxx.png/
> Why this happened?

I suspect that there are some constants that are set in the original file
that you haven't copied to the new file.  I had that problem when I moved
the shape note heads.

HTH,

Carl


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


separating flags from noteheads in font (issue4273119)

2011-03-26 Thread lemniskata . bernoullego

Reviewers: ,

Message:
Hi,

we are going to have multiple variants of each flag, fine-tuned to fit
particular stem lengths. This means LOTS of flag glyphs.
When experimenting some time ago i discovered that adding too many
glyphs results in error. I suppose it means there's a limit of how many
glyphs can be in a file, so i decided to separate flag glyphs from
notehead glyphs. This is my attempt to do so.
Unfortunetely there is a strange error: flags are now horizontally
squished (despite calling "make clean" before "make"), see
http://img829.imageshack.us/i/screenshotpxx.png/
Why this happened?

cheers,
Janek

Description:
separating flags from noteheads in font

Please review this at http://codereview.appspot.com/4273119/

Affected files:
  M mf/GNUmakefile
  M mf/bigcheese.pe.in
  A mf/feta-flags-generic.mf
  A mf/feta-flags11.mf
  A mf/feta-flags13.mf
  A mf/feta-flags14.mf
  A mf/feta-flags16.mf
  A mf/feta-flags18.mf
  A mf/feta-flags20.mf
  A mf/feta-flags23.mf
  A mf/feta-flags26.mf
  M mf/feta-noteheads-generic.mf
  D mf/feta-noteheads-test-generic.mf
  M scripts/build/gen-emmentaler-scripts.py
  M scripts/build/mf-to-table.py



___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel