<p>Le jeudi 20 avril 2023 à 21:13 +1200, Lawrence D'Oliveiro a écrit :</p>
<blockquote type="cite">
<p>On Thu, 20 Apr 2023 00:56:08 +0200, Jean Abou Samra wrote:</p>
<blockquote type="cite">
<p>I could compare the two FC_FAMILY values,
but it seems that Fontconfig does some case transformations — and
possibly other things like replacing dashes?</p>
</blockquote>
<p>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?</p>
<p>    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 <br />
            font
    #end find_face</p>
<p>(Taken from
<<a href="https://github.com/ldo/harfpy_examples/blob/master/font_features">https://github.com/ldo/harfpy_examples/blob/master/font_features</a>>.)</p>
</blockquote>
<p>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.</p>
<p>Thanks,</p>
<p>Jean</p>