Re: Detecting whether a font is a fallback

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


Le jeudi 20 avril 2023 à 21:13 +1200, Lawrence D'Oliveiro a écrit :

On Thu, 20 Apr 2023 00:56:08 +0200, Jean Abou Samra wrote:

I could compare the two FC_FAMILY values, but it seems that Fontconfig does some case transformations — and possibly other things like replacing dashes?

If you make a note of the exact family name of the font you want, then surely matching it again should be enough, shouldn’t it?

    def find_face(family_name) :         font = ft.find_face(family_name)         if font.family_name != family_name :             warnings.warn("font “%s” not found, substituting “%s” instead" % (family_name, font.family_name))         #end if         return
            font     #end find_face

(Taken from <>.)

If we were starting the LilyPond project today, that might make sense. However, there are plenty of existing LilyPond files that use font family names like “times new roman” that are substituted with “Times New Roman”, and I think we'd rather not start making those emit warnings.



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

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux