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.
<match target="pattern">
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="globaladvance" mode="assign"><bool>true</bool></edit>
<edit name="embeddedbitmap" mode="assign"><bool>false</bool></edit>
<edit name="hinting" mode="assign"><bool>false</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
<edit name="rgba" mode="assign"><const>rgb</const></edit>
<edit name="autohint" mode="assign"><bool>false</bool></edit>
<edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
</match>
2. Enable hinting for specific local fonts so that I can use them inside Emacs with a smaller font size.
<match target="font">
<test name="family"><string>Hack</string></test>
<edit name="hinting" mode="assign"><bool>true</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
</match>
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