Hi
Here's how I tested this.
1. I have the following base settings in fontconfig. They disable hinting
and autohint, so that Freetype will preserve the font shapes when rendering
web fonts.
true
true
false
false
hintnone
rgb
false
lcddefault
2. Enable hinting for specific local fonts so that I can use them inside
Emacs with a smaller font size.
Hack
true
hintfull
For this step, you can also enable hinting in font-spec under Emacs.
Here are the screenshots. They are taken on a HiDPI display, and I'm going
to retake them tomorrow at work where we have low DPI displays.
Thanks
Mike
On Fri, Jul 25, 2025 at 3:34 AM Eli Zaretskii wrote:
> > From: Mike
> > Date: Thu, 24 Jul 2025 21:12:36 -0400
> >
> > The ftcr and ftcrhb backends use cairo to render fonts, but cairo does
> > not respect font specific fontconfig settings. This patch queries
> > fontconfig with the specific font, and then it translates the fontconfig
> > settings into cairo font settings.
> >
> > Both backends would also ignore :hinting and :autohint properties from
> > the font-spec. This patch fixes that too.
>
> Thanks.
>
> I don't use Fontconfig and Cairo, so someone else who does will need
> to review the patch and try it. Would you please post a procedure to
> test this patch once applied?
>
> Also, I wonder if this will have any user-level effects, and if so,
> should we have a NEWS entry about that?
>
> And finally, to accept changes of this size, we will need you to sign
> a copyright-assignment agreement with FSF. If you are willing to do
> that, I will send you the form to fill and the instructions to go with
> it.
>
--
Thanks
Mike