OpenType supports specifying font's optical size through a GPOS 'size' feature (very odd place for such information!), it'd be nice of FC can cache such info and deliver the right match based on the requested font size. See http://www.microsoft.com/typography/OTSPEC/features_pt.htm#size for more details.
Currently, the only free font family that I know of with multiple optical sizes is Latin Modern (http://www.gust.org.pl/projects/e-foundry/latin-modern), and it is looks very broken with FC (returns styles like "10 Regular" and "8 Regular" for 10 and 8 fonts respectively, etc.)
This is implemented in HarfBuzz now. One more benefit if we decide to depend on HarfBuzz.
Created attachment 109005 [details] A testcase for fontconfig Here is attached a set of Computer Modern based fonts in the opentype collection format with the 'size' feature.
Created attachment 109006 [details] Another testcase This is similar to the previous attachment but was made as separate otf files.
FWIW, OpenType moved into the direction of adding optical size range to OS/2 table instead, and that's already supported in fontconfig. Closing this as WONTFIX.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.