compat: ESR128: enable textmetrics
These don't expose anything other than subpixels in fonts, which are already exposed. We bundle fonts and control what fallback is used per language, especially now win7/8* are dropped, I expect win + mac to very tight, and linux ALL fonts are bundled.
I enabled textmetrics on TB128 and tweaked my code locally to compared english to all other languages
tl;dr: ja
, ko
, zh-TW
are an artifact of #42465. We disabled textmetrics in FF102 (? I think it was this release) since they were new and unlikely to be used or cause breakage. It's now 2+ years later. I see no need to keep them disabled
cc: @pierov
click me for details
Note: these are the measurements of MY windows 11, and also note that the non-actualBounding
tests are a single glyph. These are not super deep dives into entropy - e.g. alphabeticBaseline
is 0
for everything (I would have to research more to find which glyphs aren't to exploit any entropy/equivalency of languages etc) - the glyph tests list from Fifield & Egelman's 2015 paper are not really fit for purpose and been on my ToDo for a long time, but good enough for this purpose - i.e we control the fonts per language
english: DOCUMENT: textmetrics: e5c6d11a
{
"actualBoundingBoxAscent": "855eef1e",
"actualBoundingBoxDescent": "8f2841e6",
"actualBoundingBoxLeft": "df5add08",
"actualBoundingBoxRight": "be91eb87",
"alphabeticBaseline": "fa4b5f1b",
"emHeightAscent": "a7c552b7",
"emHeightDescent": "d510a9c9",
"fontBoundingBoxAscent": "111e1ec0",
"fontBoundingBoxDescent": "29c7be1a",
"hangingBaseline": "b34729f7",
"ideographicBaseline": "1f63b9a4"
}
matches:
ar, ca, cs, da, de, el, es, fa, fi, fr, ga, he, hu, id, is,
it, ka, lt, mk, ms, my, no, nl, pl, pt-BR, ro, ru, sq, sv,
th, tr, uk, vi, zh-CN
same as #42465
non-matches
ja: DOCUMENT: textmetrics: 9d738474
{
"actualBoundingBoxAscent": "9bfad620",
"actualBoundingBoxDescent": "df8ac990",
"actualBoundingBoxLeft": "9ef0eb94",
"actualBoundingBoxRight": "706f3f38",
"alphabeticBaseline": "fa4b5f1b",
"emHeightAscent": "a7c552b7",
"emHeightDescent": "d510a9c9",
"fontBoundingBoxAscent": "111e1ec0",
"fontBoundingBoxDescent": "29c7be1a",
"hangingBaseline": "b34729f7",
"ideographicBaseline": "1f63b9a4"
}
ko: DOCUMENT: textmetrics: 1a803611
{
"actualBoundingBoxAscent": "cfae6100",
"actualBoundingBoxDescent": "9c3f4e8c",
"actualBoundingBoxLeft": "a143ae08",
"actualBoundingBoxRight": "bb70c9b3",
"alphabeticBaseline": "fa4b5f1b",
"emHeightAscent": "a7c552b7",
"emHeightDescent": "d510a9c9",
"fontBoundingBoxAscent": "111e1ec0",
"fontBoundingBoxDescent": "29c7be1a",
"hangingBaseline": "b34729f7",
"ideographicBaseline": "1f63b9a4"
}
zh-TW: DOCUMENT: textmetrics: a53987f0
{
"actualBoundingBoxAscent": "2451f2f6",
"actualBoundingBoxDescent": "d018f3e0",
"actualBoundingBoxLeft": "110f4be8",
"actualBoundingBoxRight": "4ab4e399",
"alphabeticBaseline": "fa4b5f1b",
"emHeightAscent": "a7c552b7",
"emHeightDescent": "d510a9c9",
"fontBoundingBoxAscent": "111e1ec0",
"fontBoundingBoxDescent": "29c7be1a",
"hangingBaseline": "b34729f7",
"ideographicBaseline": "1f63b9a4"
}