External fonts on MacOS

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

External fonts on MacOS

Christian Ebert
* Han-Wen Nienhuys on Wednesday, November 02, 2005 at 11:19:43 +0100:

> Christian Ebert wrote:
>> [This message has also been posted.]
>> * Han-Wen Nienhuys on Tuesday, November 01, 2005:
>>> Raphael Manfredi wrote:
>>>> Where does lilypond get its font list from, so that I can try others?
>>>
>>> the easiest is to put a .ttf  .pfb  or .pfa in ~/.fonts. If it shows up
>>> on the output of
>>>
>>> fc-list
>>>
>>> you can use it in lily.
>>
>> Well, I can *not* use it on MacOS 10.3.9:
>>
>> $ fc-list Sabon
>> Sabon:style=RomanOsF
>> Sabon:style=BoldOsF
>> Sabon:style=ItalicOsF
>> Sabon:style=BoldItalicOsF
>
> Can you send a more detailed bugreport?

$ lilypond --version
GNU LilyPond 2.7.14
This program is free software.  It is covered by the GNU General Public
License and you are welcome to change it and/or distribute copies of it
under certain conditions.  Invoke as `lilypond --warranty' for more
information.


Copyright (c) 1996--2005 by
  Han-Wen Nienhuys <[hidden email]>
  Jan Nieuwenhuizen <[hidden email]>
  and others.


This on MacOS 10.3.9. LilyPond is installed via dmg-installer --
Aside: I'd much prefer to compile it myself but the last version
I succeded in is 2.4.5.

When I try the following only default fonts are included (results
in comments):

#v+
\version "2.7.14"

%#(define fonts
%   (make-pango-font-tree
% "Sabon Roman Oldstyle Figures" "Sabon Roman Oldstyle Figures" "Courier" 20))
                %"Sabon-RomanOsF" "Sabon-RomanOsF" "Courier" 20))

%{
result:

$ grep BeginFont test2714.ps
%%BeginFont: CenturySchL-Roma
%%BeginFont: PFAEmmentaler-20

%}

melody = \relative c {
  c d e f g a b c \break
  c d e f g a b c
}

\score {
  <<
  %\override Score.BarNumber   #'font-name = #"Sabon Roman Oldstyle Figures"
  \override Score.BarNumber   #'font-name = #"Sabon-RomanOsF"
%{
result:

$ grep BeginFont test2714.ps
%%BeginFont: CenturySchL-Roma
%%BeginFont: PFAEmmentaler-20
%%BeginFont: LuxiSans

%}

  \context Voice = one {
    \melody
  }
>>
}

\paper { }
#v-

Apart from that I would much prefer to have the TeX-backend
working, so I can use my .tfm-files! -- But that doesn't work
either e.g with the fink version because on MacOS X kpathsea.so
is kpathsea.dylib. See

<http://search.gmane.org/?query=Lilypond+tex+backend&email=
&group=gmane.os.apple.fink.general&sort=revdate&DEFAULTOP=
and&xP=lilypond.backend.&xFILTERS=Gos.apple.fink.general---A>

I even tried to compile a recent lilypond with
all instances of kpathsea.so replace by kpathsea.dylib but failed
of course.

c
--
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
Christian Ebert wrote:
>>>$ fc-list Sabon
>>>Sabon:style=RomanOsF
>>>Sabon:style=BoldOsF
>>>Sabon:style=ItalicOsF
>>>Sabon:style=BoldItalicOsF
>>
>>Can you send a more detailed bugreport?

OK; I was actually looking for more info on this font; is it a .dfont or
resource fork? There are known problems with fondu on 10.4; One option
is to extract the TTFs from the dfont, and install those separately.
--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Christian Ebert
* Han-Wen Nienhuys on Wednesday, November 02, 2005 at 22:42:17 +0100:

> Christian Ebert wrote:
>>>> $ fc-list Sabon
>>>> Sabon:style=RomanOsF
>>>> Sabon:style=BoldOsF
>>>> Sabon:style=ItalicOsF
>>>> Sabon:style=BoldItalicOsF
>>>
>>> Can you send a more detailed bugreport?
>
> OK; I was actually looking for more info on this font; is it a .dfont or
> resource fork? There are known problems with fondu on 10.4;

10.3.9 here.

> One option is to extract the TTFs from the dfont, and install
> those separately.

I know that support of dfont is limited. I tried both ttf and
otf (and pfb).

c
--
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
Christian Ebert wrote:

> * Han-Wen Nienhuys on Wednesday, November 02, 2005 at 22:42:17 +0100:
>
>>Christian Ebert wrote:
>>
>>>>>$ fc-list Sabon
>>>>>Sabon:style=RomanOsF
>>>>>Sabon:style=BoldOsF
>>>>>Sabon:style=ItalicOsF
>>>>>Sabon:style=BoldItalicOsF
>>>>
>>>>Can you send a more detailed bugreport?
>>
>>OK; I was actually looking for more info on this font; is it a .dfont or
>>resource fork? There are known problems with fondu on 10.4;
>
>
> 10.3.9 here.
>
>
>>One option is to extract the TTFs from the dfont, and install
>>those separately.
>
>
> I know that support of dfont is limited. I tried both ttf and
> otf (and pfb).

can you send me the font privately?


--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
In reply to this post by Christian Ebert
Christian Ebert wrote:

>>OK; I was actually looking for more info on this font; is it a .dfont or
>>resource fork? There are known problems with fondu on 10.4;
>
>
> 10.3.9 here.
>
>
>>One option is to extract the TTFs from the dfont, and install
>>those separately.
>
>
> I know that support of dfont is limited. I tried both ttf and
> otf (and pfb).

Something's wrong with the support for ~/.fonts. It works if you put
them in /Library/Fonts/

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Jan Nieuwenhuizen
Han-Wen Nienhuys writes:

> Something's wrong with the support for ~/.fonts. It works if you put
> them in /Library/Fonts/

Is there a

   <dir>~/.fonts</dir>

in your ~/.fonts.conf or /etc/fonts.conf?

Jan.

--
Jan Nieuwenhuizen <[hidden email]> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
Jan Nieuwenhuizen wrote:
> Is there a
>
>    <dir>~/.fonts</dir>
>
> in your ~/.fonts.conf or /etc/fonts.conf?
>

Yes, but the quaint thing is that it works if I call the binary with all
env settings from the command line, or if I change the ~ into
/users/hanwen, but the ~ expansion fails when it is called from python
with the same settings. I'm nonplussed, and it is a nasty problem to
debug, of course.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Christian Ebert
In reply to this post by Jan Nieuwenhuizen
* Jan Nieuwenhuizen on Friday, November 04, 2005 at 08:59:51 +0100:
> Han-Wen Nienhuys writes:
>> Something's wrong with the support for ~/.fonts. It works if you put
>> them in /Library/Fonts/

No.

> Is there a
>
>    <dir>~/.fonts</dir>
>
> in your ~/.fonts.conf or /etc/fonts.conf?

/private/etc/fonts/fonts.conf says:

<!-- Font directory list configured on Tue Apr 13 17:36:38 PDT 2004 -->

        <dir>/Library/Fonts</dir>
        <dir>/Network/Library/Fonts</dir>
        <dir>/System/Library/Fonts</dir>
        <dir>/usr/X11R6/lib/X11/fonts</dir>
        <dir>/usr/share/fonts</dir>
        <dir>~/Library/Fonts</dir>
        <dir>~/.fonts</dir>

I also tried with creating a ~/.fonts.conf and putting

                <family>Sabon Roman Oldstyle Figures</family>

or

                <family>Sabon-RomanOsF</family>

in it. No go.

Still the font /is/ in ~/.fonts.cache-1

"/Users/chris/.fonts/Sabon-RomanOsF.ttf" 0 1130628605 "Sabon:style=RomanOsF:slant=0:weight=100:index=0:outline=True:scalable=True:charset=  |>^1!|>^1!P0oWQ |>]![|>^1!|>^1!!!!%# !!71$!#>r7F3y?4!!K?&   !!!)$      9;*f! !!#0GM>RAd#y#fx!!!!5     !!#3H !!!!&      !!#6I!!K?&       !!+u{!!!!)       :lang=aa|ast|ay|bi|br|ch|co|da|de|en|es|et|eu|fi|fj|fo|fr|fur|fy|gd|gl|gv|ho|ia|id|ie|io|is|it|lb|mg|nb|nl|nn|no|oc|om|pt|rm|sma|smj|so|sq|sv|sw|tn|ts|vo|vot|wa|xh|yap|zu:fontversion=65536"

c
--
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
Christian Ebert wrote:

> <dir>/Library/Fonts</dir>
> <dir>/Network/Library/Fonts</dir>
> <dir>/System/Library/Fonts</dir>
> <dir>/usr/X11R6/lib/X11/fonts</dir>
> <dir>/usr/share/fonts</dir>
> <dir>~/Library/Fonts</dir>
> <dir>~/.fonts</dir>
>
> I also tried with creating a ~/.fonts.conf and putting
>
> <family>Sabon Roman Oldstyle Figures</family>
>
> or
>
> <family>Sabon-RomanOsF</family>
>
> in it. No go.
>
> Still the font /is/ in ~/.fonts.cache-1

Can you check if 2.6.4-2 works for you? It should fix this bug. I got
Sabon by installing the Sabon Osf ttf file into ~/.fonts, and doing

   \override TextScript #'font-name =#"Sabon"
   c4^"foo129"

If you appreciate this service, please consider a donation.


Lily uses its own, private fontconfig configuration files, and ignores
local settings.   If you want to fiddle, check out
Contents/Resource/etc/fonts/ within the bundle.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Christian Ebert
* Han-Wen Nienhuys on Friday, November 04, 2005 at 14:49:00 +0100:
> Can you check if 2.6.4-2 works for you?

It does. Thanks a lot.

> If you appreciate this service, please consider a donation.

What do I get for discovering the problem ;-)

On a more serious side: the kerning w/o LaTeX font metrics is a
catastrophy. As I wrote in another post I'd be much more
interested to get the TeX-backend working with lilypond-book
(because I mainly set texts and not much notes) and to be able to
compile it myself (w/o another ghostscript installation etc.)

I still think giving up the TeX-backend (quality) in favor of
seemingly easier use is the wrong direction to take. Because what
I like(d) about lilypond is that it aimed at quality as first
priority and no foul compromises.

And as you can see in
Message-ID: <[hidden email]>
I might not be the only one who misses the connection to Tex --
plus you are using .mf for the notes anyway.

So, for the time being, it will be just my 2? ;-)

c
--
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
Christian Ebert wrote:

> On a more serious side: the kerning w/o LaTeX font metrics is a
> catastrophy. As I wrote in another post I'd be much more
> interested to get the TeX-backend working with lilypond-book
> (because I mainly set texts and not much notes) and to be able to
> compile it myself (w/o another ghostscript installation etc.)
>
> I still think giving up the TeX-backend (quality) in favor of
> seemingly easier use is the wrong direction to take. Because what
> I like(d) about lilypond is that it aimed at quality as first
> priority and no foul compromises.

I think this is a flawed analysis. TeX might be good at some things,
from a technical point of view it's complete nightmare.  The design with
Pango is much more versatile, and while it's not perfect yet, it will be
if only for the shere mass of Pango. It powers much of GTK, and with a
wide audience comes a wide array of hackers.

If you want to use TeX, be my guest; there still is a TeX backend,

   lilypond -b tex  foo.ly

which uses TeX to get exact metrics. It might have bitrotted a bit, but
if you're keen on using it, I trust that you will produce nice patches.

You will have to compile Lily by yourself, though.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
In reply to this post by Christian Ebert
Christian Ebert wrote:

> On a more serious side: the kerning w/o LaTeX font metrics is a
> catastrophy. As I wrote in another post I'd be much more
> interested to get the TeX-backend working with lilypond-book

if you want the TeX backend working, you should prboably edit
lilycall.py to include the libkpathsea dylib directory in the
DYLD_LIBRARY_PATH environment variable.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Christian Ebert
In reply to this post by Han-Wen Nienhuys
* Han-Wen Nienhuys on Saturday, November 05, 2005 at 00:32:11 +0100:

> Christian Ebert wrote:
>> On a more serious side: the kerning w/o LaTeX font metrics is a
>> catastrophy. As I wrote in another post I'd be much more
>> interested to get the TeX-backend working with lilypond-book
>> (because I mainly set texts and not much notes) and to be able to
>> compile it myself (w/o another ghostscript installation etc.)
>>
>> I still think giving up the TeX-backend (quality) in favor of
>> seemingly easier use is the wrong direction to take. Because what
>> I like(d) about lilypond is that it aimed at quality as first
>> priority and no foul compromises.
>
> I think this is a flawed analysis.

It sure is, especially as it wasn't meant as an analysis. It was
meant as an observation and an interpretation by me as a user.

Compared to earlier versions I had more difficulties to get
lilypond going and I get text output of less good quality. So I
described my fear that lilypond might lose the qualities I chose
it for. I am sure you had valid reasons to go the direction you
went, but from my subjective point of view it means at least a
momentary loss.

> TeX might be good at some things,
> from a technical point of view it's complete nightmare.

I love nightmares ;-)

> The design with
> Pango is much more versatile, and while it's not perfect yet, it will be
> if only for the shere mass of Pango. It powers much of GTK, and with a
> wide audience comes a wide array of hackers.
>
> If you want to use TeX, be my guest; there still is a TeX backend,
>
>   lilypond -b tex  foo.ly

I hope to get it working with lilypond-book too, because that's
what I mainly need.
 
> which uses TeX to get exact metrics. It might have bitrotted a bit, but
> if you're keen on using it, I trust that you will produce nice patches.

As I am not a programmer I know to /apply/ patches a little bit.
But I'll try if I can find the time.

> You will have to compile Lily by yourself, though.

I will keep trying because I want to keep profiting from you
phantastic work.

c
--
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Christian Ebert
In reply to this post by Han-Wen Nienhuys
* Han-Wen Nienhuys on Saturday, November 05, 2005 at 00:32:11 +0100:
> If you want to use TeX, be my guest; there still is a TeX backend,
>
>   lilypond -b tex  foo.ly
>
> which uses TeX to get exact metrics.

Ok. I got 2.7.15 compiled and it works (choking on the copyright
sign but I eliminated that from the .tex file). lilypond.map is
not created/installed though; there's a link from dvips/map to
../fonts/map but fonts/map is not created.

lilypond-book does not work yet. Or I don't know which parameter
to pass that corresponds to -b tex.

> It might have bitrotted a bit, but
> if you're keen on using it, I trust that you will produce nice patches.

Well, as a first try I attach my patch for 2.7.15 on MacOS
10.3.9. I am using libraries from the fink distribution but a
self compiled teTeX in /usr/local/teTeX.

environment:

LDFLAGS=-lexpat -L/usr/local/teTeX/lib -L/sw/lib/pango-ft219/lib -L/sw/lib
CPPFLAGS=-g -O3 -I/usr/local/teTeX/include -I/sw/include
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
GUILE=/sw/bin/guile-16
SGML_CATALOG_FILES=/sw/etc/sgml/catalog
FONTCONFIG_FILE=/sw/share/fontconfig-path/fontconfig-path.conf
GDK_USE_XFT=1
CXXFLAGS=-g -O3 -I/usr/local/teTeX/include -I/sw/include
PATH=/sw/var/lib/fink/path-prefix-g++-3.3:/usr/local/teTeX/bin:/usr/local/bin:/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
XML_CATALOG_FILES=/sw/etc/xml/catalog
LD_PREBIND_ALLOW_OVERLAP=1
QMAKESPEC=/sw/share/qt3/mkspecs/darwin-g++
CXX=g++-3.3
SHLVL=2
LD_PREBIND=1
CFLAGS=-g -O3 -I/usr/local/teTeX/include -I/sw/include
LD_SEG_ADDR_TABLE=/sw/var/lib/fink/prebound/seg_addr_table
MACOSX_DEPLOYMENT_TARGET=10.3
GUILE_CONFIG=guile-1.6-config
ACLOCAL_FLAGS=-I/sw/share/aclocal
PKG_CONFIG_PATH=/sw/lib/pango-ft219/lib/pkgconfig:/sw/lib/fontconfig2/lib/pkgconfig:/sw/lib/freetype219/lib/pkgconfig:/sw/lib/pkgconfig
PYTHON=/sw/bin/python2.4

compiling:
$ PREFIX=/usr/local ./lexer-gcc-3.1.sh
$ ./autogen.sh --noconf
$ ./configure --prefix=/usr/local --with-kpathsea-include=/usr/local/teTeX/include --with-kpathsea-lib=/usr/local/teTeX/lib
 
> You will have to compile Lily by yourself, though.

It's a first step.

c
--
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>

_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond

patch-lily21715.mac1039.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: External fonts on MacOS

Han-Wen Nienhuys
Christian Ebert wrote:

> * Han-Wen Nienhuys on Saturday, November 05, 2005 at 00:32:11 +0100:
>
>>If you want to use TeX, be my guest; there still is a TeX backend,
>>
>>  lilypond -b tex  foo.ly
>>
>>which uses TeX to get exact metrics.
>
>
> Ok. I got 2.7.15 compiled and it works (choking on the copyright
> sign but I eliminated that from the .tex file). lilypond.map is
> not created/installed though; there's a link from dvips/map to
> ../fonts/map but fonts/map is not created.
>
> lilypond-book does not work yet. Or I don't know which parameter
> to pass that corresponds to -b tex.

If you run lilypond-book -V you can see how lily is invoked. Your first
target should making something so the output of

   lilypond -b tex lily-437829.ly

is ready to be included in a TeX file.  If you've got that working, you
can use the --process  flag of lp-book to pass appropriate flags to
LilyPond.

--
  Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
bug-lilypond mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/bug-lilypond