[XeTeX] wrong alignment with optical bounds
Pablo Rodríguez
oinos at web.de
Fri Oct 16 22:01:28 CEST 2009
Jonathan Kew wrote:
> On 10 Oct 2009, at 18:45, Pablo Rodríguez wrote:
>
>> Hi Jonathan and others,
>>
>> I have just tried the following code:
>>
>> \documentclass[12pt]{article}
>> \usepackage[a5paper]{geometry}
>> \usepackage{fontspec}
>> \fontspec[RawFeature=+opbd;-liga]{Grandjean Baskerville}
>> \begin{verse}
>> Ἔνοιωσεν ὅτι\\
>> τοῦ ἦσαν οἱ στίχοι\\
>> ἄχαρη τύχη\\
>> καὶ ματαιότη.
>> \end{verse}
>> \end{document}
>>
>> And the result can be located at http://www.ousia.tk/a.pdf. XeTeX is
>> applying the optical bound to the first letter in text, but it also
>> creates a kind of positive kerning with the next letter.
>>
>> I guess this might be a bug.
>
> I'm afraid you're trying to do something that simply isn't supported.
> The OpenType features for optical bounds require the application to
> apply different lookups depending on where the glyph occurs on the line,
> but xetex does not support this; it applies the features you specify to
> the entire run of text, *before* line-breaking decisions have been made,
> so it cannot apply them contextually depending whether the glyph is
> actually at the start of line in the finished paragraph.
Thanks for your reply, Jonathan. Sorry for not having answered before.
> The spacing after the initial Ἔ in your PDF does look odd; this may have
> something to do with the type of OpenType lookup that has been used in
> that font. This may well be a bug. However, regardless of that, I don't
> think you can usefully use OT features in this way at the moment.
> Consider what would happen if a word beginning with Ἔ occurred in the
> middle of a line: it would end up intruding into the preceding
> inter-word space, because the feature is being applied indiscriminately.
First of all, I'm not 100% sure that the bug in the odd space is not
caused by the font, since I don't know whether the opbd feature was
properly applied using FontForge.
But consider the following example when typesetting poetry. If there
were not odd space when applying opbd, there would be a possibility of
tagging the first word in verse beginning with Ἔ using the command
\fontspec[RawFeature=+opbd;-liga]{Grandjean Baskerville} and so avoiding
other word in the middle of a verse with hanging diacritics.
Thanks for your help,
Pablo
More information about the XeTeX
mailing list