[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Check if a font is currently installed

From: Valentin Petzel
Subject: Re: Check if a font is currently installed
Date: Tue, 23 Nov 2021 00:21:34 +0100

Hello Paolo,

If you want to do this for any font you’ll have no other option but to 
basically do what font-config does, and that is to try to estimate how distant 
two font names are. I would be very useful if we could get font-config to give 
us the actual distance.


Am Dienstag, 23. November 2021, 00:15:37 CET schrieb Paolo Prete:
> Hello Valentin,
> >From what I understand, your procedure relies on the convention that the
> name of the font file has to be very similar to the descriptive name of the
> font; unfortunately, this adds unsafety to the procedure I wrote before
> (which is already unsafe), even if it shortens that procedure a bit.
> I think that the only way to have a reliable check is to parse the
> configured name.
> An additional C++ helper function, wrapped by Scheme, is highly useful IMHO
> (and maybe it should require few lines of additional code), but I wonder as
> well if a solution can be found for the last stable versions of LilyPond
> too. I have to meditate about it...
> Best,
> Paolo
> On Mon, Nov 22, 2021 at 11:31 PM Valentin Petzel <> wrote:
> > Hello Paolo,
> > 
> > This behaviour actually comes from font-config and not from Lilypond. It
> > is
> > somewhat sensible, since we want to be able to specify a font intuitively
> > and
> > not by some set identifier.
> > 
> > One hacky way to get what you want if you are checking for very specific
> > fonts
> > could be this, which would be checking the font file for some string we’d
> > expect to find in it.
> > 
> > Cheers,
> > Valentin

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]