Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
May I apply the patch below? - NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style | - grep 'file:' | grep -v \.ttf` + NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style:foundry=urw | grep 'file:' | grep -v \.ttf` Looks good to me (if you use proper indentation :-). Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
John Mandereau john.mander...@gmail.com writes: Werner LEMBERG a écrit : Sorry, I don't understand the problem. Why will this lilypond fix break something in Canorus or vice versa? Canorus installs Truetype versions of some of those fonts, system-wide. The Lilypond configure command finds some of those truetype fonts via fc-match in preference of the usual Type1 versions coming with GhostScript. This causes compilation of Lilypond to fail. This part I have understood. But I don't see a problem if we make lilypond find the Type 1 versions of the URW fonts. lf I understand correctly, the point of this subthread is figuring out how to check presence of all Type 1 URW fonts to convert them to OTF in the build process and install these OTFs, which is for example needed for reading SVG output. This checking is done via configure script, so IMHO it's a different issue from font selection by lilypond itself. May I apply the patch below? Best, John ## diff --git a/configure.in b/configure.in index d8f1199..d45c4c0 100644 --- a/configure.in +++ b/configure.in @@ -73,7 +73,7 @@ if test $NCSB_DIR != ; then else if test $FCMATCH != ; then for style in Roman Italic Bold Italic Bold; do - NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style | grep 'file:' | grep -v \.ttf` + NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style:foundry=urw | grep 'file:' | grep -v \.ttf` This should, I think, be an improvement over the previous situation. At least it would have stopped the problem I had. From the discussion afterwards, I _think_ that the resulting behavior should be more or less acceptable. However, Werner made it sound like Lilypond should come with its own version of the fonts and use that, in which case it would seem sort of pointless looking for the system-wide installation of those fonts. So while the above patch fixes the symptom for the particular configuration with which I encountered the problem, it may be possible that we are barking up the wrong tree altogether trying to find the right system font. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
However, Werner made it sound like Lilypond should come with its own version of the fonts and use that, in which case it would seem sort of pointless looking for the system-wide installation of those fonts. We need to find the system's Type 1 fonts to generate OTFs out of them, with fixed ligatures if necessary, and which are used locally only. Thus I think the patch is correct. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
Werner LEMBERG a écrit : Looks good to me (if you use proper indentation :-). Applied. John ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
Werner LEMBERG a écrit : Sorry, I don't understand the problem. Why will this lilypond fix break something in Canorus or vice versa? Canorus installs Truetype versions of some of those fonts, system-wide. The Lilypond configure command finds some of those truetype fonts via fc-match in preference of the usual Type1 versions coming with GhostScript. This causes compilation of Lilypond to fail. This part I have understood. But I don't see a problem if we make lilypond find the Type 1 versions of the URW fonts. lf I understand correctly, the point of this subthread is figuring out how to check presence of all Type 1 URW fonts to convert them to OTF in the build process and install these OTFs, which is for example needed for reading SVG output. This checking is done via configure script, so IMHO it's a different issue from font selection by lilypond itself. May I apply the patch below? Best, John ## diff --git a/configure.in b/configure.in index d8f1199..d45c4c0 100644 --- a/configure.in +++ b/configure.in @@ -73,7 +73,7 @@ if test $NCSB_DIR != ; then else if test $FCMATCH != ; then for style in Roman Italic Bold Italic Bold; do - NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style | grep 'file:' | grep -v \.ttf` + NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style:foundry=urw | grep 'file:' | grep -v \.ttf` NCSB_FILE=`echo $NCSB_FILE | sed 's/^.*\(.*\).*$/\1/g'` NCSB_FILE=`$PYTHON $srcdir/scripts/auxiliar/readlink.py $NCSB_FILE` ## ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
David Kastrup a écrit : Ok, so the bad news: canorus was not in the package repository. So reinstallation is not trivial: I have to dig it up and then install it. And then it is likely that the version I'll be able to find will be quite different from what I had installed previously (and which would never have been updated after that). Probably not something I'll be able to do before the weekend. You mean trying packages from https://developer.berlios.de/project/showfiles.php?group_id=6144 ? I just compiled and installed Canorus from source, and couldn't get TTF fonts to be selected vs. Type 1. If you can reproduce this issue on your system and my patch fixes it, then we'll consider applying it. Best, John ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
John Mandereau john.mander...@gmail.com writes: David Kastrup a écrit : Ok, so the bad news: canorus was not in the package repository. So reinstallation is not trivial: I have to dig it up and then install it. And then it is likely that the version I'll be able to find will be quite different from what I had installed previously (and which would never have been updated after that). Probably not something I'll be able to do before the weekend. You mean trying packages from https://developer.berlios.de/project/showfiles.php?group_id=6144 ? I just compiled and installed Canorus from source, and couldn't get TTF fonts to be selected vs. Type 1. If you can reproduce this issue on your system and my patch fixes it, then we'll consider applying it. Sigh. I have Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name VersionDescription +++-==-==- rc canorus0.5-1ubuntu1 Free cross-platform music score editor and this package apparently installed including truetype fonts. Debian and Ubuntu always have had their own packagings. I'll try installing the 0.5 from Berlios and see where this gets me. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
David Kastrup d...@gnu.org writes: John Mandereau john.mander...@gmail.com writes: David Kastrup a écrit : Ok, so the bad news: canorus was not in the package repository. So reinstallation is not trivial: I have to dig it up and then install it. And then it is likely that the version I'll be able to find will be quite different from what I had installed previously (and which would never have been updated after that). Probably not something I'll be able to do before the weekend. You mean trying packages from https://developer.berlios.de/project/showfiles.php?group_id=6144 ? I just compiled and installed Canorus from source, and couldn't get TTF fonts to be selected vs. Type 1. If you can reproduce this issue on your system and my patch fixes it, then we'll consider applying it. Sigh. I have Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name VersionDescription +++-==-==- rc canorus0.5-1ubuntu1 Free cross-platform music score editor and this package apparently installed including truetype fonts. Debian and Ubuntu always have had their own packagings. I'll try installing the 0.5 from Berlios and see where this gets me. The bug is back. After the patch, I still am at configure:4099: checking New Century Schoolbook PFB files configure:4131: result: /usr/share/fonts/type1/gsfonts/c059036l.pfb /usr/share/fonts/type1/gsfonts/c059013l.pfb The corresponding passage in configure is { echo $as_me:$LINENO: checking New Century Schoolbook PFB files 5 echo $ECHO_N checking New Century Schoolbook PFB files... $ECHO_C 6; } if test $NCSB_DIR != ; then NCSB_SOURCE_FILES= for f in c059013l c059016l c059033l c059036l; do if test ! -f $NCSB_DIR/$f.pfb; then { echo $as_me:$LINENO: WARNING: $NCSB_DIR does not contain $f.pfb. 5 echo $as_me: WARNING: $NCSB_DIR does not contain $f.pfb. 2;} warn_b=yes else NCSB_SOURCE_FILES=$NCSB_DIR/$f.pfb $NCSB_SOURCE_FILES fi done else if test $FCMATCH != ; then for style in Roman Italic Bold Italic Bold; do NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style:fontformat=Type 1 | grep 'file:' | grep -v \.ttf` NCSB_FILE=`echo $NCSB_FILE | sed 's/^.*\(.*\).*$/\1/g'` NCSB_FILE=`$PYTHON $srcdir/scripts/auxiliar/readlink.py $NCSB_FILE` NCSB_SOURCE_FILES=$NCSB_FILE $NCSB_SOURCE_FILES done else { echo $as_me:$LINENO: result: not found 5 echo ${ECHO_T}not found 6; } echo Can't find Century Schoolbook files. Install FontConfig's fc-match, echo or use --with-ncsb-dir fi fi { echo $as_me:$LINENO: result: $NCSB_SOURCE_FILES 5 echo ${ECHO_T}$NCSB_SOURCE_FILES 6; } Running manually fc-match --verbose Century Schoolbook L:style=Bold:fontformat=Type 1 gives Pattern has 33 elts (size 48) family: Century Schoolbook L(s) familylang: en(s) style: Bold(s) stylelang: en(s) fullname: Century Schoolbook L Bold(s) fullnamelang: en(s) slant: 0(i)(s) weight: 200(i)(s) width: 100(i)(s) size: 12(f)(s) pixelsize: 12.5(f)(s) foundry: unknown(s) antialias: FcTrue(w) hintstyle: 2(i)(w) hinting: FcTrue(w) verticallayout: FcFalse(s) autohint: FcFalse(s) globaladvance: FcTrue(s) file: /usr/share/fonts/truetype/canorus/CenturySchL-Bold.ttf(s) index: 0(i)(s) outline: FcTrue(s) scalable: FcTrue(s) dpi: 75(f)(s) rgba: 1(i)(w) scale: 1(f)(s) charset: : 7fff ffdfdffe 0001: fcff 0004 00018003 0002: 0300 3fc0 0003: 0010 1000 0004: f000 199f 033f 001e: 03ff 0020: 7718 06010047 0010 1000 0021: 0004 0022: 44060004 0031 0025: 0400 00f6: 01f8 00fb: 0006 (s) lang:
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
David Kastrup d...@gnu.org writes: If one uses the --sort option, one gets dozens of fonts. The Type1 font is at the second place and increasingly dissimilar fallbacks follow. The fontformat= entry does not seem to change anything any which way. Using foundry=urw in contrast helps. But that probably is asking more than you want. Something like fc-match --verbose --sort Century Schoolbook L:style=Bold|awk '/^$/{if(m){print file;exit(0)}};/fontformat: Type 1/{m=1};/file: /{match($0,/.*/)file=substr($0,RSTART+1,RLENGTH-2)}' appears to do the trick. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
If one uses the --sort option, one gets dozens of fonts. The Type1 font is at the second place and increasingly dissimilar fallbacks follow. The fontformat= entry does not seem to change anything any which way. Using foundry=urw in contrast helps. But that probably is asking more than you want. I don't think so. AFAIK, we want *exactly* the URW versions, so this looks like a good alternative. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
2009/3/18 David Kastrup d...@gnu.org: Werner LEMBERG w...@gnu.org writes: I don't think so. AFAIK, we want *exactly* the URW versions, so this looks like a good alternative. When I wrote the above, my rationale was that the URW fonts are Century Schoolbook font clones with identical font metrics. If someone would be to install the original Century Schoolbook fonts, he'd likely disable the URW fonts in the process (or at least put them later in the search order). Do we really want to use these particular clones in case there are supposedly metrically identical fonts installed in a preferred setting? Namely: do we actually need the URW fonts and nothing else, or do we need something that the system installation is prepared to call Century Schoolbook? If for some reason, only the URW version of those fonts is acceptable, the foundry=urw variant obviously is the way to go. Maybe another solution is requiring other fonts, IIRC Werner proposed TexGyre Schola a while ago. It looks like a good idea to append foundry=urw in fc-match call in configure, but this fix will break when the foundry field of TTFs shipped with Canorus changes from unknown to urw -- or maybe this won't happen because TTF files will never provide urw as foundry? I rely on advice from a fonts guru here. Best, John ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
I don't think so. AFAIK, we want *exactly* the URW versions, so this looks like a good alternative. Do we really want to use these particular clones in case there are supposedly metrically identical fonts installed in a preferred setting? IMHO yes. Those fonts are intended as fallback fonts; the user is free to override them with something different. If for some reason, only the URW version of those fonts is acceptable, the foundry=urw variant obviously is the way to go. I would it formulate differently: The URW fonts are free, they fit exactly our purposes, it doesn't hurt to install them, so make lilypond depend on them unconditionally. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
John Mandereau john.mander...@gmail.com writes: It looks like a good idea to append foundry=urw in fc-match call in configure, but this fix will break when the foundry field of TTFs shipped with Canorus changes from unknown to urw -- or maybe this won't happen because TTF files will never provide urw as foundry? I rely on advice from a fonts guru here. Please note that I checked the problem to occur with an installation of Canorus 0.5. Canorus has advanced to a new version since then. For me the solution was to simply delete the Canorus package. I have no idea whether newer versions of Debian packagings of Canorus will mangle the font installation in different ways or install TrueType fonts at all. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
Maybe another solution is requiring other fonts, IIRC Werner proposed TexGyre Schola a while ago. If we do the switch (which I still want to do but my usual lack of time prevents this), we enforce exactly the new font as the default, so the solution should be the same. It looks like a good idea to append foundry=urw in fc-match call in configure, but this fix will break when the foundry field of TTFs shipped with Canorus changes from unknown to urw -- or maybe this won't happen because TTF files will never provide urw as foundry? I rely on advice from a fonts guru here. Sorry, I don't understand the problem. Why will this lilypond fix break something in Canorus or vice versa? Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
Werner LEMBERG w...@gnu.org writes: Maybe another solution is requiring other fonts, IIRC Werner proposed TexGyre Schola a while ago. If we do the switch (which I still want to do but my usual lack of time prevents this), we enforce exactly the new font as the default, so the solution should be the same. It looks like a good idea to append foundry=urw in fc-match call in configure, but this fix will break when the foundry field of TTFs shipped with Canorus changes from unknown to urw -- or maybe this won't happen because TTF files will never provide urw as foundry? I rely on advice from a fonts guru here. Sorry, I don't understand the problem. Why will this lilypond fix break something in Canorus or vice versa? Canorus installs Truetype versions of some of those fonts, system-wide. The Lilypond configure command finds some of those truetype fonts via fc-match in preference of the usual Type1 versions coming with GhostScript. This causes compilation of Lilypond to fail. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
Sorry, I don't understand the problem. Why will this lilypond fix break something in Canorus or vice versa? Canorus installs Truetype versions of some of those fonts, system-wide. The Lilypond configure command finds some of those truetype fonts via fc-match in preference of the usual Type1 versions coming with GhostScript. This causes compilation of Lilypond to fail. This part I have understood. But I don't see a problem if we make lilypond find the Type 1 versions of the URW fonts. Werner ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
On Wed, Mar 18, 2009 at 12:34 PM, Werner LEMBERG w...@gnu.org wrote: Canorus installs Truetype versions of some of those fonts, system-wide. The Lilypond configure command finds some of those truetype fonts via fc-match in preference of the usual Type1 versions coming with GhostScript. This causes compilation of Lilypond to fail. This part I have understood. But I don't see a problem if we make lilypond find the Type 1 versions of the URW fonts. IIRC, we have some hacks to fix up ligature errors in older versions of the URW fonts, so it is important we use our own. However, IIRC, we also search in the lilypond paths first, so selection of our version should be automatic. -- Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
[PATCH] Re: Why is it _still_ so freaking hard to get info with images?
David Kastrup wrote: So it would appear to be a problem that fc-match first finds the true type fonts installed by Canorus, and then this first match is subsequently thrown away by grep -v. So I think you need to figure out how to tell fc-match to prefer Type1 over TrueType, or how to make it list all matches rather than a single one. Weeding out the Truetype when it has been listed _instead_ rather than in addition to the Type1 fonts will not do the trick. I haven't investigated far enough to be able to force Fontconfig to prefer TTF over Type 1, so I can't reproduce the problem you describe. Does the attached patch help on your system? At least it doesn't break font selection on my Fedora 9 system. Best, John diff --git a/configure.in b/configure.in index d8f1199..e27d828 100644 --- a/configure.in +++ b/configure.in @@ -73,7 +73,7 @@ if test $NCSB_DIR != ; then else if test $FCMATCH != ; then for style in Roman Italic Bold Italic Bold; do - NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style | grep 'file:' | grep -v \.ttf` + NCSB_FILE=`$FCMATCH --verbose Century Schoolbook L:style=$style:fontformat=Type 1 | grep 'file:' | grep -v \.ttf` NCSB_FILE=`echo $NCSB_FILE | sed 's/^.*\(.*\).*$/\1/g'` NCSB_FILE=`$PYTHON $srcdir/scripts/auxiliar/readlink.py $NCSB_FILE` ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
John Mandereau john.mander...@gmail.com writes: David Kastrup wrote: So it would appear to be a problem that fc-match first finds the true type fonts installed by Canorus, and then this first match is subsequently thrown away by grep -v. So I think you need to figure out how to tell fc-match to prefer Type1 over TrueType, or how to make it list all matches rather than a single one. Weeding out the Truetype when it has been listed _instead_ rather than in addition to the Type1 fonts will not do the trick. I haven't investigated far enough to be able to force Fontconfig to prefer TTF over Type 1, I don't think mine does. so I can't reproduce the problem you describe. Does the attached patch help on your system? At least it doesn't break font selection on my Fedora 9 system. I will try today evening, but since I already removed the canorus package and am not sure it was provided by my package repository, it might be that I will not be able to restore the system to a state susceptible to the problem. It may also be that the order of fonts will be different after reinstallation. So no promises. The patch looks plausible, though. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: [PATCH] Re: Why is it _still_ so freaking hard to get info with images?
David Kastrup d...@gnu.org writes: John Mandereau john.mander...@gmail.com writes: David Kastrup wrote: So it would appear to be a problem that fc-match first finds the true type fonts installed by Canorus, and then this first match is subsequently thrown away by grep -v. So I think you need to figure out how to tell fc-match to prefer Type1 over TrueType, or how to make it list all matches rather than a single one. Weeding out the Truetype when it has been listed _instead_ rather than in addition to the Type1 fonts will not do the trick. I haven't investigated far enough to be able to force Fontconfig to prefer TTF over Type 1, I don't think mine does. so I can't reproduce the problem you describe. Does the attached patch help on your system? At least it doesn't break font selection on my Fedora 9 system. I will try today evening, but since I already removed the canorus package and am not sure it was provided by my package repository, it might be that I will not be able to restore the system to a state susceptible to the problem. It may also be that the order of fonts will be different after reinstallation. So no promises. The patch looks plausible, though. Ok, so the bad news: canorus was not in the package repository. So reinstallation is not trivial: I have to dig it up and then install it. And then it is likely that the version I'll be able to find will be quite different from what I had installed previously (and which would never have been updated after that). Probably not something I'll be able to do before the weekend. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel