Collapse (v/)hkern tags' into compound u1/u2/g1/g2 attributes

Registered by Johan Sundström

In a font spec, <hkern> and <vkern> elements can make up a marjority of the space of the markup, due to the combinatorial explosion of character pair kerning info, with one such tag per character pair there is kerning info for. They can typically be collapsed to much fewer kern tags than that, though. Example:

    <hkern g1="M.alt" g2="P.alt" k="10" />
    <hkern g1="M.alt" u2="&#xad;" k="10" />
    <hkern g1="M.alt" u2="&#xae;" k="10" />
    <hkern g1="M.alt" u2="&#xe7;" k="10" />
    <hkern g1="M.alt" u2="&#xf0;" k="10" />
    <hkern g1="M.alt" u2="&#xf2;" k="10" />
    <hkern g1="M.alt" u2="&#xf3;" k="10" />
    <hkern g1="M.alt" u2="&#xf4;" k="10" />
    <hkern g1="M.alt" u2="&#xf5;" k="10" />
    <hkern g1="M.alt" u2="&#xf6;" k="10" />
    <hkern g1="M.alt" u2="&#xf8;" k="10" />
    <hkern g1="M.alt" u2="&#xf9;" k="10" />
    <hkern g1="M.alt" u2="&#xfa;" k="10" />
    <hkern g1="M.alt" u2="&#xfb;" k="10" />
    <hkern g1="M.alt" u2="&#xfc;" k="10" />
    <hkern g1="M.alt" u2="&#xfd;" k="10" />
    <hkern g1="M.alt" u2="&#xff;" k="10" />
    <hkern g1="M.alt" u2="&#x153;" k="10" />
    <hkern g1="M.alt" u2="&#x2013;" k="10" />
    <hkern g1="M.alt" u2="&#x2014;" k="10" />

…can be collapsed down to:

    <hkern k="10" g1="M.alt" g2="P.alt" u2="&#x2014;,&#xad;,&#xe7;&#xf0;,&#xf2;-&#xf6;,&#xf8;-&#xfd;,&#xff;,&#x153;,&#x2013;,&#x2014;"/>

…or, for short:

    <hkern k="10" g1="M.alt" g2="P.alt" u2="—,­,çð,ò-ö,ø-ý,ÿ,œ,–,—"/>

I think both the g1/u1 and g2/u2 attributes can be collapsed at the same time too, for the optimal case where {some set of character-1:s} and {some set of character-2:s} have the same kern attribute between all their enumerable tuples [ch1, ch2], which would amount to yet a strength reduction of the output size.

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.