[HarfBuzz] Accent positioning with greek smallcaps

Georg Duffner g.duffner at gmail.com
Sat Jan 12 06:21:56 PST 2013


Am 2013-01-12 09:15, schrieb Behdad Esfahbod:
> On 13-01-11 02:18 AM, Georg Duffner wrote:
>> Thank you, Behdad!
>>
>> I’ve found the problematic parts and fixed them in the font. In
>> fact, Fontforge did warn about it, but I didn’t see the warning
>> due to script based font generation.
>
>
> Interesting.  Can you elaborate a bit?  I don't use Fontforge
> myself. What was exactly wrong?

I had two different anchors in one subtable that don’t appear on all the
base letters in the same subtable. This is one of the two faulty subtables:

markClass [\uni0345.cap1 ] <anchor 25 290> @grk_uc_right;
markClass [\uni0345.cap2 ] <anchor 15 290> @grk_uc_right;
markClass [\uni0345.sc1 ] <anchor 0 290> @grk_uc_right;
markClass [\uni0313 \uni0313.sc ] <anchor 82 665> @grk_uc_top_left;
markClass [\uni0314 \uni0314.sc ] <anchor 84 665> @grk_uc_top_left;
markClass [\uni0342 \uni0342.sc ] <anchor 213 517> @grk_uc_top_left;
markClass [\tonos \gravecomb.grk \acutecomb.grk \gravecomb.grksc
\acutecomb.grksc ] <anchor 77 630> @grk_uc_top_left;
markClass [\uni0313.grk \uni0314.grk \uni0313.grksc \uni0314.grksc ]
<anchor 202 630> @grk_uc_top_left;
markClass [\uni0313.grkstack \uni0314.grkstack \uni0313.grkstacksc
\uni0314.grkstacksc ] <anchor 135 665> @grk_uc_top_left;
markClass [\uni0306.cap \uni0308.cap ] <anchor 152 720> @grk_uc_top;
markClass [\uni0304.cap ] <anchor 165 720> @grk_uc_top;

pos base [\Alpha ] <anchor 373 720> mark @grk_uc_top
   <anchor 186 665> mark @grk_uc_top_left
   <anchor 684 290> mark @grk_uc_right;
pos base [\Epsilon \Eta \Iota \Rho ] <anchor -36 665> mark
@grk_uc_top_left
   <anchor 297 720> mark @grk_uc_top
   <anchor 535 290> mark @grk_uc_right;
pos base [\Omicron ] <anchor 25 665> mark @grk_uc_top_left
   <anchor 393 720> mark @grk_uc_top
   <anchor 763 290> mark @grk_uc_right;
pos base [\Upsilon \Upsilon1 ] <anchor -41 665> mark @grk_uc_top_left
   <anchor 375 720> mark @grk_uc_top
   <anchor 613 290> mark @grk_uc_right;
pos base [\Omega ] <anchor 60 665> mark @grk_uc_top_left
   <anchor 422 720> mark @grk_uc_top
   <anchor 830 290> mark @grk_uc_right;
pos base [\alpha.sc \Alpha.sc ] <anchor 549 190> mark @grk_uc_right;
pos base [\epsilon.sc \Epsilon.sc ] <anchor 468 190> mark @grk_uc_right;
pos base [\eta.sc \Eta.sc ] <anchor 634 190> mark @grk_uc_right;
pos base [\iota.sc \Iota.sc ] <anchor 301 190> mark @grk_uc_right;
pos base [\omicron.sc \Omicron.sc ] <anchor 616 190> mark @grk_uc_right;
pos base [\upsilon.sc \Upsilon.sc ] <anchor 449 181> mark @grk_uc_right;
pos base [\omega.sc \Omega.sc ] <anchor 646 190> mark @grk_uc_right;
subtable;

There are three anchors grk_uc_top_left (for normal greek uppercase 
accents), grk_uc_top (for dieresis) and grk_uc_right (for iota 
adscriptum). The uppercase letters take all three but smallcaps have the 
same top accent positioning like lc letters so they only take the iota 
adscriptum mark. I didn’t know that this isn’t allowed before (and I 
still have to fix this in italic and 8pt fonts). The warning issued by 
Fontforge is: “Contains anchor points for some, but not all, classes in 
a subtable”

> I think the way HarfBuzz now handles this is still superior, so
> leaving it as is.

Of course.

Best regards, Georg

> Cheers, behdad
>
>> Am 2013-01-08 23:18, schrieb Behdad Esfahbod:
>>> Figured it out:
>>>
>>> If you check with ttx for example, indeed Lookup 34, MarkBasePos
>>> subtable 1 covers that mark and base sequence but has no anchor
>>> for it.  However, subtable 2 has.  Just fixed HarfBuzz to keep
>>> looking if an anchor is missing. Renders fine now.
>>>
>>> Thanks,
>>>
>>> behdad
>>>
>>> On 13-01-08 01:14 AM, Georg Duffner wrote:
>>>> Hi Behdad,
>>>>
>>>> which tool did you use for debugging? With Fontforge I can’t
>>>> find the null anchor you found. The source featurefile as well
>>>> as the featurefile extracted from the font both show correct
>>>> values for the anchors and inn Fontforge’s metrics view, the
>>>> results look as expected. What’s more, XeTeX and LuaTeX
>>>> position the accents correctly (they fail at other places
>>>> though).
>>>>
>>>> Georg
>>>>
>>>> Am 2013-01-07 10:25, schrieb Behdad Esfahbod:
>>>>> Hi Georg,
>>>>>
>>>>> I debugged the font.  It does look like a font issue to me.
>>>>> The MarkBase table for those accents and those bases has a
>>>>> null anchor for the base. That's all I know.
>>>>>
>>>>> behdad
>>>>>
>>>>> On 13-01-07 02:06 AM, Georg Duffner wrote:
>>>>>> Hello,
>>>>>>
>>>>>> There seems to be something wrong with accent positioning
>>>>>> in greek smallcaps with a ccmp feature enabled. In EB
>>>>>> Garamond I’ve put together a feature (as stylistic set
>>>>>> ss20) that decomposes all composed characters and mark and
>>>>>>  mkmk anchors are in place where needed. This all works
>>>>>> nicely with Harfbuzz except for greek smallcaps as you can
>>>>>> see at http://georgduffner.at/ebgaramond/greektests.html
>>>>>> (with Firefox of course). Accents are placed in front of
>>>>>> the letters at the bottom instead of atop of the letters.
>>>>>> The last row of “Smallcaps” shows that latin smallcaps are
>>>>>>  fine, simple ones as well as stacked ones. I got the same
>>>>>> results with hb-view (harfbuzz 0.9.9 on Arch Linux).
>>>>>>
>>>>>> Results from hb-shape are:
>>>>>>
>>>>>> 1: (ἂἅἇ) 1: <U+1F02,U+1F05,U+1F07> 1:
>>>>>> [alpha.sc=0+549|uni0313.grksc=0 at -751,-630+0|gravecomb.grkstacksc=0 at -626,-630+0|alpha.sc=1+549|uni0314.grksc=1 at -751,-630+0|acutecomb.grkstacksc=1 at -626,-630+0|alpha.sc=2+549|uni0314.grkstacksc=2 at -684,-665+0|uni0342.sc=2 at -771,-489+0]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
and
>>>>>>
>>>>>> 1: (áäấÄÖÜ) 1: <U+00E1,U+00E4,U+1EA5,U+00C4,U+00D6,U+00DC>
>>>>>>  1:
>>>>>> [a.sc=0+549|acutecomb.sc=0 at -319,65+0|a.sc=1+549|uni0308.sc=1 at -421,84+0|a.sc=2+549|uni0302.stacksc=2 at -389,65+0|acutecomb.stacksc=2 at -197,167+0|Adieresis.deu=3+684|Odieresis.deu=4+763|Udieresis.deu=5+738]
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
I attach the results from hb-view.
>>>>>> The options used are: --features="ss20","smcp"
>>>>>>
>>>>>> You can find the font used in the tests at
>>>>>> http://georgduffner.at/ebgaramond/tests/EBGaramond12-Regular.otf
>>>>>>
>>>>>>
(it is too big for the limit of this list, even when
>>>>>> compressed).
>>>>>>
>>>>>> Please note that the testpage on the web uses a version of
>>>>>> the font where the decomposition table is included in ccmp
>>>>>> which I don’t want to because this should only be enabled
>>>>>> when really necessary. But it doesn’t make a difference.
>>>>>>
>>>>>> Best regards, Georg
>>>>>>
>>>>>>
>>>>>> _______________________________________________ HarfBuzz
>>>>>> mailing list HarfBuzz at lists.freedesktop.org
>>>>>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>>
>


-- 
EB Garamond: http://www.georgduffner.at/ebgaramond



More information about the HarfBuzz mailing list