ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Pablo Rodriguez <oinos@gmx.es>
To: ntg-context@ntg.nl
Subject: Re: issue with optical bounds (OpenType)
Date: Sun, 9 Dec 2018 13:34:24 +0100	[thread overview]
Message-ID: <ee50452a-3ae9-89ed-d27b-ede7dc99ee60@gmx.es> (raw)
In-Reply-To: <e9be2926-a14b-934a-e29c-e28c0ab381c8@xs4all.nl>

On 12/7/18 11:25 PM, Hans Hagen wrote:
> On 12/7/2018 9:14 PM, Pablo Rodriguez wrote:
>> [...]
>> The issue is that, although opbd values are used, that results from opbd
>> and from single placement in addfeature are different (although LuaTeX
>> reports the same values for lfbd).
> 
> because you implement it as kerning and not as opbd (protrusion is not 
> kerning) ... you can try to change the name to "lfbd" (if you would 
> enable lfbd as feature for sure you would get funny kerning so opbd 
> picks up from those instead)

If protrusion has to apply other values than the ones besides opbd, the
values for optical bounds aren’t reliable for accurate glyph
positioning. Sorry, but otherwise there is no need for optical margins
in OpenType (standard protrusion would be all that is needed).

Kerning might be selectively applied, such as in:

    \startluacode
    fonts.handlers.otf.addfeature {
        name = "leftbounds",
        type = "single",
        data = {
            Ἠ = { -212, 0, -212, 0 },
            Ὧ = { -196, 0, -196, 0 },
        }
    }
    \stopluacode
    \definefontfeature[default][default][protrusion=quality]
    \definefontfeature[leftbounds][leftbounds=yes]
    \setupfirstline
       [alternative=word, n=1, style={\feature[+][leftbounds]}]
    \showframe
    \setuplayout[page]
    \definefontfamily[mainface][rm][Typographica Old Standard]
    \definefontfamily[mainface][tt][Latin Modern Mono]
    \setupbodyfont[mainface, 300pt]
    \setupalign[hanging]
    \startbuffer
        «a\par
        «b\par
        Ω\par
        Ὧ\par
        Ἠ\par
    \stopbuffer
    \starttext
        \setupparagraphintro[each][\setfirstline]
        \getbuffer
    \stoptext

At least to get Greek hanging diacritics, I think this is the way to go.
It would be extremely useful to enable a \setuplineintro for verse.

It would be also useful to have a function that substracts the width of
two given glyphs. (This is exactly the amount to get hanging diacritics
properly kerned.)

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2018-12-09 12:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07 18:54 Pablo Rodriguez
2018-12-07 19:15 ` Hans Hagen
2018-12-07 20:14   ` Pablo Rodriguez
2018-12-07 22:25     ` Hans Hagen
2018-12-09 12:34       ` Pablo Rodriguez [this message]
2018-12-09 13:22         ` Hans Hagen
2018-12-09 16:35           ` Pablo Rodriguez
2018-12-09 17:53             ` Hans Hagen
2018-12-09 19:54               ` Pablo Rodriguez
2018-12-10  9:51                 ` Hans Hagen
2018-12-10 19:19                   ` Pablo Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee50452a-3ae9-89ed-d27b-ede7dc99ee60@gmx.es \
    --to=oinos@gmx.es \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).