Getting back into Lilypond/Frescobaldi

2023-04-10 Thread Michael Hendry
I’ve started to review my old lead sheets, which use lilyjazz fonts, and find 
that previously unproblematic files are compiled with no staff, just a long 
list of chord names.

Going back to basics, with this rudimentary file...

\version "2.24.0"
{ c'4 d' e' f’}

…I get the following log, but the music review is as expected.

Starting lilypond 2.24.0 [Untitled]...
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: 
XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: 
XML or text declaration not at start of entity
Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 2: 
XML or text declaration not at start of entity
Processing 
`/var/folders/7z/6v5y7dgj181bb5j44lt_6d2wgn/T/frescobaldi-8koxns79/tmpcqdvl9c4/document.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Converting to `document.pdf'...
Success: compilation successfully completed
Completed successfully in 0.5”.


The lead-sheets deliver the same “Fontconfig…” error messages, but also include 
the following warnings:

interpreting music...
warning: cannot find property type-check for `markFormatter' 
(translation-type?).  perhaps a typing error?
warning: skipping assignment

Any suggestions would be gratefully received.

Michael Hendry
--
iMac Retina 5k 2020
OS 13.2.1 (22D68)

Re: Getting back into Lilypond/Frescobaldi

2023-04-10 Thread Jean Abou Samra
Le lundi 10 avril 2023 à 18:05 +0100, Michael Hendry a écrit :
> I’ve started to review my old lead sheets, which use lilyjazz fonts, and find 
> that previously unproblematic files are compiled with no staff, just a long 
> list of chord names.
> 
> Going back to basics, with this rudimentary file...
> 
> \version "2.24.0"  
> { c'4 d' e' f’}
> 
> …I get the following log, but the music review is as expected.  
> **  
> **  
> Starting lilypond 2.24.0 [Untitled]...  
> Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 
> 2: XML or text declaration not at start of entity  
> Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 
> 2: XML or text declaration not at start of entity  
> Fontconfig error: "/Users/michaelhendry/.config/fontconfig/fonts.conf", line 
> 2: XML or text declaration not at start of entity  
> Processing 
> `/var/folders/7z/6v5y7dgj181bb5j44lt_6d2wgn/T/frescobaldi-8koxns79/tmpcqdvl9c4/document.ly'
>   
> Parsing...  
> Interpreting music...  
> Preprocessing graphical objects...  
> Finding the ideal number of pages...  
> Fitting music on 1 page...  
> Drawing systems...  
> Converting to `document.pdf'...  
> Success: compilation successfully completed

Could you send the contents of the 
/Users/michaelhendry/.config/fontconfig/fonts.conf file? It's in a hidden 
folder (`.config`, which starts with a dot), so you will likely have to toggle 
something to show hidden files/directories in the Finder. A Google search 
suggests "Command Shift Dot". After doing that, you should see ".config" in 
your home folder and find "fontconfig" then "fonts.conf" inside it. Send that 
file.

LilyPond uses a library called Fontconfig in order to find fonts on the system. 
Fontconfig supports configuration files. Apparently yours is corrupted, or 
maybe only valid with a recent version of Fontconfig that LilyPond 2.24 doesn't 
have. It would be interesting to test the development release 2.25.4, by the 
way.

> The lead-sheets deliver the same “Fontconfig…” error messages, but also 
> include the following warnings:
> 
> interpreting music...  
> warning: cannot find property type-check for `markFormatter' 
> (translation-type?).  perhaps a typing error?  
> warning: skipping assignment


You should *always* (yes, always) run convert-ly before trying old scores on 
new versions.

It will automatically fix the syntax of your file to be compatible with the new 
version of LilyPond.

Developers (like me) put awful amounts of efforts into making it work well. 
It's a pity not to use that.

In Frescobaldi, that's in Tools > Update with convert-ly.

Best,

Jean


signature.asc
Description: This is a digitally signed message part


Re: Getting back into Lilypond/Frescobaldi

2023-04-10 Thread Michael Hendry


> On 10 Apr 2023, at 19:02, Jean Abou Samra  wrote:
> 
> SNIP
> 

> Could you send the contents of the 
> /Users/michaelhendry/.config/fontconfig/fonts.conf file? It's in a hidden 
> folder (.config, which starts with a dot), so you will likely have to toggle 
> something to show hidden files/directories in the Finder. A Google search 
> suggests "Command Shift Dot". After doing that, you should see ".config" in 
> your home folder and find "fontconfig" then "fonts.conf" inside it. Send that 
> file.
> 
> LilyPond uses a library called Fontconfig in order to find fonts on the 
> system. Fontconfig supports configuration files. Apparently yours is 
> corrupted, or maybe only valid with a recent version of Fontconfig that 
> LilyPond 2.24 doesn't have. It would be interesting to test the development 
> release 2.25.4, by the way.
> 

Thanks, Jean,

This is what’s in ~.config/fontconfig/fonts.conf:





 

>> The lead-sheets deliver the same “Fontconfig…” error messages, but also 
>> include the following warnings:
>> 
>> interpreting music...
>> warning: cannot find property type-check for `markFormatter' 
>> (translation-type?). perhaps a typing error?
>> warning: skipping assignment
>> 
> You should always (yes, always) run convert-ly before trying old scores on 
> new versions.
> 
> It will automatically fix the syntax of your file to be compatible with the 
> new version of LilyPond.
> 
> Developers (like me) put awful amounts of efforts into making it work well. 
> It's a pity not to use that.
> 
> In Frescobaldi, that's in Tools > Update with convert-ly.
> 
I’ve tried that on these old files, but it doesn’t resolve the problem.

Regards,

Michael



Re: Getting back into Lilypond/Frescobaldi

2023-04-10 Thread Jean Abou Samra
Le lundi 10 avril 2023 à 22:59 +0100, Michael Hendry a écrit :
> Thanks, Jean,
>   
> This is what’s in ~.config/fontconfig/fonts.conf:
> 
>   
>   
>   
>   
>    
> 

That definitely does not look like a valid config file. It has a duplicate XML 
declaration, and the `` element should not be empty. Not sure what 
software left this borked config file on this computer.

I would just remove it, it's not doing anything apart from triggering errors 
AFAICS.

> > > The lead-sheets deliver the same “Fontconfig…” error messages, but also 
> > > include the following warnings:
> > > interpreting music...  
> > >  warning: cannot find property type-check for `markFormatter' 
> > > (translation-type?).  perhaps a typing error?  
> > >  warning: skipping assignment
> > >  
> > You should *always* (yes, always) run convert-ly before trying old scores 
> > on new versions.
> > It will automatically fix the syntax of your file to be compatible with the 
> > new version of LilyPond.
> > Developers (like me) put awful amounts of efforts into making it work well. 
> > It's a pity not to use that.
> > In Frescobaldi, that's in Tools > Update with convert-ly.
> 
> I’ve tried that on these old files, but it doesn’t resolve the problem.


Are you sure that the 2.23.5 → 2.23.6 conversion step was run properly?

My guess is that you updated the `\version` number before running convert-ly. 
It detects the version to upgrade from using the version statement, so you 
should not do that, but instead let convert-ly change the version for you.

In the log from convert-ly that Frescobaldi shows you, you should see "2.23.6" 
among the list of conversions that were run.

Another possibility is that you have a use of “markFormatter” in an include 
file and you forgot to convert that one.



signature.asc
Description: This is a digitally signed message part


Re: Getting back into Lilypond/Frescobaldi

2023-04-11 Thread Michael Hendry
On 10 Apr 2023, at 23:13, Jean Abou Samra  wrote:
> 
> Le lundi 10 avril 2023 à 22:59 +0100, Michael Hendry a écrit :
> 
>> Thanks, Jean,
>> 
>> This is what’s in ~.config/fontconfig/fonts.conf:
>> 
>>  
> That definitely does not look like a valid config file. It has a duplicate 
> XML declaration, and the  element should not be empty. Not sure what 
> software left this borked config file on this computer.
> 
> I would just remove it, it's not doing anything apart from triggering errors 
> AFAICS.
> 

I’ve deleted this file, with no apparent consequences.

 The lead-sheets deliver the same “Fontconfig…” error messages, but also 
 include the following warnings: interpreting music...
 warning: cannot find property type-check for `markFormatter' 
 (translation-type?). perhaps a typing error?
 warning: skipping assignment
 
>>> You should always (yes, always) run convert-ly before trying old scores on 
>>> new versions. It will automatically fix the syntax of your file to be 
>>> compatible with the new version of LilyPond. Developers (like me) put awful 
>>> amounts of efforts into making it work well. It's a pity not to use that. 
>>> In Frescobaldi, that's in Tools > Update with convert-ly.
>>> 
>> I’ve tried that on these old files, but it doesn’t resolve the problem.
>> 
> Are you sure that the 2.23.5 → 2.23.6 conversion step was run properly?
> 
> My guess is that you updated the \version number before running convert-ly. 
> It detects the version to upgrade from using the version statement, so you 
> should not do that, but instead let convert-ly change the version for you.
> 
> In the log from convert-ly that Frescobaldi shows you, you should see 
> "2.23.6" among the list of conversions that were run.
> 
> Another possibility is that you have a use of “markFormatter” in an include 
> file and you forgot to convert that one.
> 

That was the problem - I hadn’t run convert-ly on all of the include files.

I’m left with only one error when trying to compile my leadsheets:

fatal error: cannot find font: `lilyjazz-11’

I’ll obviously have to reinstall the jazz fonts.

Thanks again for your help,

Michael

Re: Getting back into Lilypond/Frescobaldi

2023-04-11 Thread Jean Abou Samra
Le mardi 11 avril 2023 à 08:07 +0100, Michael Hendry a écrit :
> On 10 Apr 2023, at 23:13, Jean Abou Samra  wrote:  
> > Le lundi 10 avril 2023 à 22:59 +0100, Michael Hendry a écrit :
> >  
> > > Thanks, Jean,
> > > This is what’s in ~.config/fontconfig/fonts.conf:
> > >   
> > That definitely does not look like a valid config file. It has a duplicate 
> > XML declaration, and the `` element should not be empty. Not sure what 
> > software left this borked config file on this computer.
> > I would just remove it, it's not doing anything apart from triggering 
> > errors AFAICS.
> 
> 
> I’ve deleted this file, with no apparent consequences.


So you removed the file, yet there is still a warning mentioning that file... ??

Are you sure that it's still the same file path in the warning?

Did you check that the file was indeed not there anymore at the moment you 
compiled the test .ly file? Maybe some background process / daemon recreated it?


signature.asc
Description: This is a digitally signed message part


Re: Getting back into Lilypond/Frescobaldi

2023-04-11 Thread Michael Hendry
On 11 Apr 2023, at 08:26, Jean Abou Samra  wrote:

> 
> Le mardi 11 avril 2023 à 08:07 +0100, Michael Hendry a écrit :
> 
>> On 10 Apr 2023, at 23:13, Jean Abou Samra j...@abou-samra.fr 
>>  wrote:
>> 
>>> Le lundi 10 avril 2023 à 22:59 +0100, Michael Hendry a écrit :
>>> 
 Thanks, Jean, This is what’s in ~.config/fontconfig/fonts.conf:  
 That definitely does not look like a valid config file. It has a duplicate 
 XML declaration, and the  element should not be empty. Not sure what 
 software left this borked config file on this computer. I would just 
 remove it, it's not doing anything apart from triggering errors AFAICS.
 
>> I’ve deleted this file, with no apparent consequences.
>> 
> So you removed the file, yet there is still a warning mentioning that file... 
> ??
> 

Sorry, what I meant was that there were no adverse consequences (in the sense 
of Mac OS warnings, or font problems) of the deletion that I could detect - the 
warnings from Frescobaldi disappeared.
> Are you sure that it's still the same file path in the warning?
> 
> Did you check that the file was indeed not there anymore at the moment you 
> compiled the test .ly file? Maybe some background process / daemon recreated 
> it?
> 

The good news is that I’ve been able to compile one of my old leadsheets 
successfully, including the use of jazz fonts.

I downloaded lilypond-2.4.1, expanded it and moved the whole directory to my 
home directory.
The instructions for the installation of the lilyjazz fonts for Mac OSX assume 
that lilypond is installed as a conventional Mac App, and refer to 
“INSTALLDIR/Lilypond.app/Contents/Resources/share/lilypond/current” with 
subdirectories for fonts, but there doesn’t appear to be a .DMG version 
available, so I copied the lilyjazz fonts into the corresponding directories in 
~/lilypond-2.4.1
I updated Frescobaldi’s preferences to use 2.4.1 by default.
I updated Frescobaldi’s preferences to add 2.4.1’s ./bin and ./etc/fonts to the 
include path.
I loaded a leadsheet.ly file, and ran convert-ly on it (it had already been 
updated to 2.4.0).
This generated a warning about Python3.10, and I opened Privacy & Security to 
fix it.
There was no mention of Python in Privacy & Security, so I closed the warning 
and tried again.
This time there was a warning about Python, so I authorised its use.
Noticing that the first line of the .ly file was unchanged by convert-ly 
(\version “2.24.0”) I adjusted it to 2.24.1.
I then ran “Engrave (preview) and got a warning (as with Python3.10) relating 
to gs, and resolved it the same way

Et voilà! 

Problems solved.

Thanks again for your help.

Michael

Re: Getting back into Lilypond/Frescobaldi

2023-04-11 Thread Tim's Bitstream



> On Apr 11, 2023, at 4:43 AM, Michael Hendry  wrote:
> 
> The instructions for the installation of the lilyjazz fonts for Mac OSX 
> assume that lilypond is installed as a conventional Mac App, and refer to 
> “INSTALLDIR/Lilypond.app/Contents/Resources/share/lilypond/current” with 
> subdirectories for fonts, but there doesn’t appear to be a .DMG version 
> available, so I copied the lilyjazz fonts into the corresponding directories 
> in ~/lilypond-2.4.1

This has been my experience, also. I think if the font and/or app is not 
installed In The Apple Way, applications like LP can't find them.  When I 
upgrade Lilypond, each time I have to manually install the lilyjazz fonts into 
the appropriate Lilypond subdirectories or they don't get used by LP.  Apple is 
not helpful for things like this.



Re: Getting back into Lilypond/Frescobaldi

2023-04-11 Thread Jean Abou Samra
Le mardi 11 avril 2023 à 07:59 -0500, Tim's Bitstream a écrit :
> This has been my experience, also. I think if the font and/or app is not 
> installed In The Apple Way, applications like LP can't find them.  When I 
> upgrade Lilypond, each time I have to manually install the lilyjazz fonts 
> into the appropriate Lilypond subdirectories or they don't get used by LP.  
> Apple is not helpful for things like this.


Not that I like Apple, but it's LilyPond's fault here. It's exactly the same on 
Linux or Windows. See 
[#6486](https://gitlab.com/lilypond/lilypond/-/issues/6486).

(I am working on lots of font changes and this issue is on my short-term TODO 
list.)


signature.asc
Description: This is a digitally signed message part