OpenType and font-variant support



Hello all,

It appears that support for the variant property in Pango has not yet
been implemented.  At this time, the only thing variant is supposed to
do is enable small-caps.  However, after looking into getting more
advanced support for the OpenType features for Latin alphabets, I
believe that the variant property should be extended to enable access
to the OpenType features which have not yet previously been available.
 These features include the aforementioned small capitals, swash
capitals, selecting proportional/tabular lining/old-style figures,
fractions, and so on.

I propose that 'variant' become a comma-separated list.  Each
comma-separated value would either be the name of a property
("small-caps") or that name prefixed with no- in order to disable that
property ("no-contextual-ligatures").  Internally, these would map to
a bitmask, which can replace the current enum with very few changes to
the source.  It is my understanding that adding rules to the in-memory
copy of the GSUB table of OpenType fonts is a simple way to cause the
desired changes to appear, although I have not yet fully investigated
this.

I believe modifying 'variant' is the right choice, rather than adding
many additional properties.  While CSS, like Pango, uses font-variant
to select between normal and small caps, Microsoft's WPF uses it to
select between subscript and superscript, and Apple's Cocoa does not
even appear to use the term 'variant'.  Since its meaning is not
defined in a technical sense, using it in this expanded manner should
not be confusing or inconsistent.

If a consensus can be reached on the design aspects of this
enhancement, I'd be happy to perform the implementation.

Thanks,
Steven


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]