<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I updated the VARC hinting guidance proposal with some fixes and
clarifications<br>
concerning CFSH PrivateDICTs. The new draft is still at</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/adobe-type-tools/opentype-spec-drafts/blob/main/varchintguide.pdf">https://github.com/adobe-type-tools/opentype-spec-drafts/blob/main/varchintguide.pdf</a></p>
<p>Here is a diff of the Markdown:</p>
<p><span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">diff --git
a/varchintguide.md b/varchintguide.md
</span><br>
index 095588c..f5359dd 100644
<br>
--- a/varchintguide.md
<br>
+++ b/varchintguide.md
<br>
@@ -1,7 +1,7 @@
<br>
---
<br>
title: "VARC Hint Guidance for CFF2"
<br>
<br>
-date: February 9, 2024
<br>
+date: February 12, 2024
<br>
author: Skef Iterum
<br>
mainfont: LibertinusSerif-Regular.otf
<br>
geometry: margin=1.4in
<br>
@@ -44,6 +44,10 @@ uint16 initialPrivateDICT The
FontDICT index associated with of
<br>
Offset32 fdSelectOffset Offset (from start of CFSH
table) to
<br>
the FontDICTSelect subtable.
Must not
<br>
be 0.
<br>
+
<br>
+Offset32 itemVarStoreOffset Offset (from start of CFSH
table) to
<br>
+ the Item Variation Store
table (may
<br>
+ be 0)
<br>
-------------------------------------------------------------------------
<br>
<br>
## Private DICT Index and initialPrivateDICT {-}
<br>
@@ -61,6 +65,13 @@ of the CFF2 FontDICT INDEX, so that the index
of the first CFSH Private DICT is
<br>
one greater than the index of the last CFF2 Private DICT. The
indexes of the
<br>
two sets of Private DICTs must not overlap.
<br>
<br>
+If the itemVarStoreOffset field is non-zero, then the `vsindex`
and `blend`
<br>
+operators refer to the Item Variation Store it points to. If
the field is zero
<br>
+then those operators refer to the Item Variation Store in the
CFF2 table.
<br>
+
<br>
+PrivateDICTs in the CFSH table must not use the `Subrs`
operator, and thus
<br>
+are always self-contained.
<br>
+
<br>
## The FontDICTSelect Offset {-}
<br>
<br>
The FontDICTSelect offset points to a CFF2 FontDICTSelect
subtable
<br>
@@ -76,6 +87,10 @@ subtable in the 'CFF2' table but there must
not be gap between the last glyph
<br>
mapped in 'CFF2' and the first glyph mapped in 'CFSH'. The
`sentinel` field in
<br>
'CFSH' must be the highest GID defined in the font.
<br>
<br>
+## The itemVarStore Offset {-}
<br>
+
<br>
+When not zero this points to an Item Variation Store used for
the `vsindex` and
<br>
+`blend` operators for the private dicts in the table.
<br>
<br>
# VARC and Hinting {-}
<br>
<br>
@@ -110,15 +125,20 @@ transformations and translations through
all compositing layers.
<br>
<br>
### The Private DICT {-}
<br>
<br>
-Two subtables of two different tables define the association
between a GID and
<br>
-a Private DICT. The first is the FontDICTSelect subtable of the
'CFSH' table,
<br>
-which, with one exception, is checked first. If the GID is not
mapped there, the
<br>
-mapping falls back to the FontDICTSelect subtable of 'CFF2'.
<br>
-
<br>
-The exception case is if the two FontDICTSelect mappings
overlap for a GID and
<br>
-both the CFF2 glyph and the VARC glyph with that GID have
non-empty content.
<br>
-In that case the FontDICTSelect subtable from 'CFSH' is used
for the VARC glyph
<br>
-while the FontDICTSelect subtable from CFF2 is used for the
CFF2 glyph.
<br>
+Two subtables of two different tables define the association
between the GID of
<br>
+a VARC composite and a Private DICT. The first is the
FontDICTSelect subtable
<br>
+of the 'CFSH' table, which is checked first. If the GID is not
mapped there,
<br>
+the mapping falls back to the FontDICTSelect subtable of
'CFF2'.
<br>
+
<br>
+Note that rendering a CFF2 component of a composite glyph will
typically
<br>
+require data from both the component's Private DICT and the
composite's Private
<br>
+DICT. The former is always stored in the CFF2 table and mapped
by the CFF2
<br>
+FontDICTSelect subtable, and may contain `Subrs` and `vsindex`
operators needed
<br>
+to desubroutinize and resolve any `blend`s. The composite
PrivateDICT can be in
<br>
+either the CFF2 table or the CFSH table and defines the
composite glyph's
<br>
+"Blue" parameters and standard stem sizes. (When a VARC
composite loads data
<br>
+from the CFF2 component with the same GID, tne FontDICTSelect
mapping in CFSH
<br>
+will typically need to overlap with that of the CFF2 table for
that glyph.)
<br>
<br>
Fonts that conform to the specification will map all GIDs to at
least one
<br>
Private DICT, but if a mapping is missing the client should use
FontDICT index
<br>
@@ -217,7 +237,10 @@ that extensively modified the CFF2 text is
not yet integrated.)
<br>
maxp count.
<br>
<br>
2. When a font has a VARC table, the highest glyph mapped by
the
<br>
- FontDICTSelect structure can be less than the maxp count as
long as there
<br>
- is a `CFSH` table mapping any remaining glyphs. The ranges
of mapped glyphs
<br>
- can overlap as described in (cross-reference `CFSH` section
"The
<br>
- FontDICTSelect Offset")
<br>
+ FontDICTSelect structure can be less than the maxp count as
long as two
<br>
+ requirements are met. The first requirement is that there
is a `CFSH` table
<br>
+ that maps any remaining glyphs. The second requirement is
that every glyph
<br>
+ in the CharStringINDEX must be mapped.
<br>
+
<br>
+ The ranges of mapped glyphs can overlap as described in
(cross-reference
<br>
+ `CFSH` section "The FontDICTSelect Offset")<br>
</span></p>
<p><span style="font-family:monospace"></span>Skef<br>
<span style="font-family:monospace"></span></p>
</body>
</html>