Re: problems with ly:font-load

2008-12-10 Thread Valentin Villenave
2008/12/9 Werner LEMBERG [EMAIL PROTECTED]:

  I've just added ly:font-config-add-directory and
  ly:font-config-add-font.  Please test.

Hi Werner,
for some reason I can't figure out how to make it work. Would you have
an example file to send me?
I've tried
#(ly:font-config-add-font ./Documents/chemoelectric_-_Goudy_Bookletter_1.otf)

or
#(ly:font-config-add-directory ./Documents/)

and then

c-\markup{ \override #'(font-name . Goudy Bookletter) text }

But this doesn't work (more surprisingly, it doesn't display any
message during the compilation??). Before you ask, I have also removed
the fontconfig cache before compiling the .ly file.

Looking forward to making it work! :-)

Cheers,
Valentin


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


Re: problems with ly:font-load

2008-12-10 Thread Werner LEMBERG

 for some reason I can't figure out how to make it work.  Would you
 have an example file to send me?

 I've tried
 #(ly:font-config-add-font 
 ./Documents/chemoelectric_-_Goudy_Bookletter_1.otf)

 or
 #(ly:font-config-add-directory ./Documents/)

 and then

 c-\markup{ \override #'(font-name . Goudy Bookletter) text }

 But this doesn't work (more surprisingly, it doesn't display any
 message during the compilation??).

What message do you expect?  You get something if you add command line
option `-V' to lilypond.

 Before you ask, I have also removed the fontconfig cache before
 compiling the .ly file.

This is irrelevant.  Fonts added by the two new functions are not
cached in the cache file.


Let's assume that you have a subdirectory `f', and the font in this
directory is `pala.ttf'.  Try this (in file `f.ly'):

  #(ly:font-config-add-directory ./f)
  #(ly:font-config-display-fonts)

  \relative {
c-\markup{ \override #'(font-name . Palatino) text }
  }

with

  lilypond f.ly 2 f.log

Hmm, this doesn't work; it's not the right font.  Looking into the log
file, I see that this font is not called `Palatino' but `Palatino
Linotype'.  Fixing this, I get the desired result.


Werner


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


Re: problems with ly:font-load

2008-12-10 Thread Valentin Villenave
2008/12/10 Werner LEMBERG [EMAIL PROTECTED]:

 for some reason I can't figure out how to make it work.  Would you
 have an example file to send me?

 But this doesn't work (more surprisingly, it doesn't display any
 message during the compilation??).

 What message do you expect?  You get something if you add command line
 option `-V' to lilypond.

I expected to see the messages you added in font-config-scheme.cc :-)

 This is irrelevant.  Fonts added by the two new functions are not
 cached in the cache file.

Neat.

 Let's assume that you have a subdirectory `f', and the font in this
 directory is `pala.ttf'.  Try this (in file `f.ly'):

Oh, I didn't think TTF fonts would work (of course, I should have
guessed that any file recognized by fontconfig could do the trick).

 Hmm, this doesn't work; it's not the right font.  Looking into the log
 file, I see that this font is not called `Palatino' but `Palatino
 Linotype'.  Fixing this, I get the desired result.

Indeed. Actually, I was mixing up the font-family name with the actual
font-name; now it works!

Wooohoo, this will make Lilypond even more exciting!

Thanks a lot,
Valentin


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


Re: problems with ly:font-load

2008-12-10 Thread Werner LEMBERG

 Oh, I didn't think TTF fonts would work (of course, I should have
 guessed that any file recognized by fontconfig could do the trick).

This is not correct.  Lilypond can't handle bitmap fonts (which
FontConfig will also find if it is configured to do so -- we have to
implement something to reject them), and it currently can't handle
TTCs; the latter is something I would like to change as soon as time
permits.


Werner


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


Re: problems with ly:font-load

2008-12-09 Thread Werner LEMBERG

  However, it shouldn't be to hard to add functions
  `ly:font-config-register-directory' and
  `ly:font-config-register-file' (using FcConfigAppFontAddFile) to
  lilypond.
 
 That would be awesome; [...]

I've just added ly:font-config-add-directory and
ly:font-config-add-font.  Please test.


Werner


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


Re: problems with ly:font-load

2008-12-09 Thread Werner LEMBERG

  I've just added ly:font-config-add-directory and
  ly:font-config-add-font.  Please test.
 
 Yeepee! I'm compiling right away.

Just a warning: I got crashes with fontconfig 2.4.1; if you experience
the same you should try version 2.6.0.


Werner


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


Re: problems with ly:font-load

2008-11-30 Thread Werner LEMBERG
  Are you aware of the fact that
 
   (ly:font-load foo)
 
  only loads an OTF font with the name `foo.otf'?  Additionally, the
  font should contain OpenType tables `LILC', `LILY', and `LILF', or
  you get a warning message.
 
 Feel free to update the name to reflect this.

Done.  It's now called ly:system-font-load.  I omit a conversion rule
for convert-ly since this function hasn't worked in an updateable form
since one or two years already, and there weren't complaints IIRC.


Werner


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


Re: problems with ly:font-load

2008-11-27 Thread Werner LEMBERG

  Note that lilypond can't load any other font by itself; it uses
  uses the fontconfig interface for everything else.
 
 BTW: a while ago, I asked you if there was a way to load fonts that
 are *not* installed on the system (by forcing fontconfig to detect
 fonts, say, in the same directory as the .ly sources).  Can LilyPond
 do that?

I don't think so.  Have a look into font-config.cc: There you can see
that FcConfigAppFontAddDir is called for

  lilypond_datadir + /fonts/otf
  lilypond_datadir + /fonts/type1

only (the latter should be removed eventually as soon as we no longer
need the PFB fonts).  However, it shouldn't be to hard to add
functions `ly:font-config-register-directory' and
`ly:font-config-register-file' (using FcConfigAppFontAddFile) to
lilypond.

Any takers?  I can't promise that I can provide such functions
quickly.


Werner


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


Re: problems with ly:font-load

2008-11-27 Thread Valentin Villenave
2008/11/27 Werner LEMBERG [EMAIL PROTECTED]:

 However, it shouldn't be to hard to add
 functions `ly:font-config-register-directory' and
 `ly:font-config-register-file' (using FcConfigAppFontAddFile) to
 lilypond.

 Any takers?  I can't promise that I can provide such functions
 quickly.

That would be awesome; of course I can launch FontConfig through a
makefile but makefiles don't work under (a standard installation of)
Windows. So, this way I could ship my opera with some nice fonts
included in the sources, and these fonts would be automagically used
whenever compiling the score, on whichever OS :-)

If you think it's manageable, feel free to open an issue in the
tracker (I won't do so myself, since my point of view is not objective
on this topic)...

Cheers,
Valentin


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


Re: problems with ly:font-load

2008-11-26 Thread Valentin Villenave
2008/11/26 Werner LEMBERG [EMAIL PROTECTED]:

 Note that lilypond can't load any other font by itself; it uses uses
 the fontconfig interface for everything else.

BTW: a while ago, I asked you if there was a way to load fonts that
are *not* installed on the system (by forcing fontconfig to detect
fonts, say, in the same directory as the .ly sources). Can LilyPond do
that?

Cheers,
Valentin


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


Re: problems with ly:font-load

2008-11-26 Thread Han-Wen Nienhuys
On Wed, Nov 26, 2008 at 5:53 AM, Werner LEMBERG [EMAIL PROTECTED] wrote:

 Are you aware of the fact that

  (ly:font-load foo)

 only loads an OTF font with the name `foo.otf'?  Additionally, the
 font should contain OpenType tables `LILC', `LILY', and `LILF', or you
 get a warning message.

Feel free to update the name to reflect this.

-- 
Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen


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


problems with ly:font-load

2008-11-25 Thread Werner LEMBERG

Are you aware of the fact that

  (ly:font-load foo)

only loads an OTF font with the name `foo.otf'?  Additionally, the
font should contain OpenType tables `LILC', `LILY', and `LILF', or you
get a warning message.

In other words, this function is only suited to load lilypond's
`system' fonts and nothing else.  This should be mentioned in the doc
string.

Note that lilypond can't load any other font by itself; it uses uses
the fontconfig interface for everything else.


Werner


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