[Fontconfig] Pango support for `size' OpenType feature?

Behdad Esfahbod behdad at behdad.org
Tue Sep 11 19:48:38 PDT 2012


On 09/11/2012 10:08 PM, Raimund Steger wrote:
> Behdad Esfahbod wrote:
>> [...]
>>
>> At any rate, it can easily go into Fontconfig.  We just need to add an element
>> for design size, perhaps one for the design range, possibly for design name,
>> and then make the matcher match the font with design size closest to requested
>> size...
> 
> Isn't this quite similar to the way bitmap fonts are currently picked? They
> have their 'design size' already which is just the normal pixelsize property,
> it's in _FcMatchers and when I request 'Lucida:pixelsize=17.5' I get a close
> neighbor, in this case the 17px version. Granted I'm not really sure how much
> of the existing logic could be applied in a situation where it's necessary to
> support upper/lower bounds...

Indeed.  You're right on point.  I simplified things a bit though.  The
matcher should first try to match a font that has the desired (point, not
pixel) size in its supported range, and failing that, pick the one with
closest design size.

It's really perhaps 200 lines of code, and mostly in getting the 'size'
parameters out of the font.

behdad

> Raimund
> 
> 


More information about the Fontconfig mailing list