<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Mangal;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
@font-face
{font-family:"Sitka Text";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"\@Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Sitka Text";
color:windowtext;
font-weight:normal;
font-style:normal;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:946424624;
mso-list-template-ids:1581425160;}
@list l1
{mso-list-id:1365862692;
mso-list-template-ids:-1852396104;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text"">Behdad is correct that CVT values are calculated once per font at the parent transform.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text"">The full component transform is not available to the bytecode.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text"">The GETINFO instruction returns Bit 8 equal to 1 if the current glyph has been rotated, and bit 9 equal to 1 if the current glyph has been stretched.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text""><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text"">GregH<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Sitka Text""><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Behdad Esfahbod <behdad@behdad.org> Tuesday, February 6, 2024 8:56 AM<br>
<br>
<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Skef,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">* Indeed, CVT values are only calculated once per font, not per transformed components.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">* Is the full component transformation available to the bytecode? If yes, we can spec that the VARC components are hinted post-transformation.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">* What transformations are safe to hint can be left to the font. It can have a function to determine that. It can even be in the `prep` code which is run once, and set a CVT value to disable hinting fontwide if necessary.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">b<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">behdad<br>
<a href="http://behdad.org/" target="_blank">http://behdad.org/</a><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Feb 5, 2024 at 5:04<span style="font-family:"Arial",sans-serif"> </span>PM Skef Iterum via mpeg-otspec <<a href="mailto:mpeg-otspec@lists.aau.at">mpeg-otspec@lists.aau.at</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p>Coming back to this subject --<o:p></o:p></p>
<p>We just did a couple explicit tests and it appears that the developing understanding is still conflating two distinct things: whether and how the
<i>context</i> that the font is being rendered in is transformed, and whether and how a component of a composite glyph is transformed.
<o:p></o:p></p>
<p>One might imagine a rasterizer that does something like the following:<o:p></o:p></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1">
Each component is given access to CVT-derived values that take into account the total transformation of the component (any "external" transformation plus any transformation at the composite level).<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1">
Whether grid-fitting is active depends on those component-specific CVT values. If there is rotation or skew the fitting might always be off. If there is just scaling maybe it is left on.<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo1">
If the instructions are on, they apply to the points of the component <i>post-</i>tranformation.
<o:p></o:p></li></ol>
<p>What our experiments imply is:<o:p></o:p></p>
<ol start="1" type="1">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2">
The CVT values only vary by "external" transformation, not component transformation. Therefore if there is no "external" skew or rotation, instructions will generally be turned on for every component.<o:p></o:p></li><li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo2">
Grid-fitting of the component occurs <i>pre-</i>transformation. The points of the component are transformed to their final locations in a later step.
<o:p></o:p></li></ol>
<p>So if this is accurate the typical result of rendering a component with a skew and/or rotation in a context that does not have skew and/or rotation will be to grid-fit the "original" component using its hint data and then transforming the result. This will
yield a glyph that is distorted (due to the grid-fitting) but not hinted according to the pixel grid it is rendered against.
<o:p></o:p></p>
<p>So, one thing the VARC specification could, well, <i>specify</i> is that VARC components extracted from the glyf table are hinted more like the first list above than the second -- with further details presumably to be worked out. That way, with an appropriate
header, grid fitting could be on or off depending on the total transformation of the component. Whether the existing instruction set is rich enough to handle non-uniform scaling when grid-fitting isn't cancelled by skew or rotation still seems like an open
question, given that that's not how things seem to work in practice now. But such a change would be a start.
<o:p></o:p></p>
<p>However, the VARC spec being added to the working draft says <i>nothing</i> about hinting, apparently leaving the question of how hinting is supposed to be managed in the face of component transformation -- the latter being a central part of VARC -- unresolved.
<o:p></o:p></p>
<p>Skef<o:p></o:p></p>
<div>
<p class="MsoNormal">On 1/26/24 13:04, Greg Hitchcock wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Sitka Text"">Through a combination of the GETINFO instruction and the INSTCTRL instruction, glyphs or fonts can make educated decisions
about whether to apply instructions under different circumstances such as rotations, stretching, &c. Typically we recommend in the pre-program to disable hints under rotation, but if someone comes up with a clever algorithm for handling this, that is an option.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Sitka Text""> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Sitka Text"">GregH</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Sitka Text""> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> mpeg-otspec
<a href="mailto:mpeg-otspec-bounces@lists.aau.at" target="_blank"><mpeg-otspec-bounces@lists.aau.at></a>
<b>On Behalf Of </b>Skef Iterum via mpeg-otspec<br>
<b>Sent:</b> Friday, January 26, 2024 11:33 AM<br>
<b>To:</b> Laurence Penney <a href="mailto:lorp@lorp.org" target="_blank"><lorp@lorp.org></a><br>
<b>Cc:</b> mpeg-otspec <a href="mailto:mpeg-otspec@lists.aau.at" target="_blank">
<mpeg-otspec@lists.aau.at></a><br>
<b>Subject:</b> Re: [MPEG-OTSPEC] VARC, glyf, and TT-instructions</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 11.25pt">
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">You don't often get email from
<a href="mailto:mpeg-otspec@lists.aau.at" target="_blank">mpeg-otspec@lists.aau.at</a>.
<a href="https://aka.ms/LearnAboutSenderIdentification" target="_blank">Learn why this is important</a></span><o:p></o:p></p>
</div>
</td>
<td width="75" style="width:56.25pt;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 3.75pt">
</td>
</tr>
</tbody>
</table>
<div>
<p> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On 1/24/24 23:47, Laurence Penney wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On 25 Jan 2024, at 01:25, Skef Iterum via mpeg-otspec
<a href="mailto:mpeg-otspec@lists.aau.at" target="_blank"><mpeg-otspec@lists.aau.at></a> wrote:<o:p></o:p></p>
</blockquote>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">There is a distinction between whether the text path itself is skewed or<br>
rotated and whether a component in a composite is skewed or rotated.<br>
Asking around it seems as though with the existing glyf components<br>
instructions are <i>not</i> automatically turned off when "compositing", but<br>
perhaps that info is wrong. <o:p></o:p></p>
<p>Either way, though, that seems like something the specification should<br>
clarify.<o:p></o:p></p>
</blockquote>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I asked similar questions when I was getting my head around TT hinting, and recall being told that skewed or rotated components were not hinted. The person I asked would most likely
have been Greg Hitchcock.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Josh Hadley on our team got curious about this and did an experiment or two<br>
in VTT. As far as we can tell there is no automatic disabling of hints when using<br>
"not nice" transformations, at least in that tool. We can provide a specific<br>
example or two if anyone needs them.<br>
<br>
It's possible that the "client side" implementations work differently than the <br>
development tools but designers are likely to take the guidance of those tools<br>
unless there is very strong conventional wisdom pointing in a different<br>
direction.<o:p></o:p></p>
<p>Skef<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal">_______________________________________________<br>
mpeg-otspec mailing list<br>
<a href="mailto:mpeg-otspec@lists.aau.at" target="_blank">mpeg-otspec@lists.aau.at</a><br>
<a href="https://lists.aau.at/mailman/listinfo/mpeg-otspec" target="_blank">https://lists.aau.at/mailman/listinfo/mpeg-otspec</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>