ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Fwd:  ligature exceptions
       [not found] <009E164E-926C-4014-94BC-704EFDFF5228@fiee.net>
@ 2017-10-06 15:21 ` Henning Hraban Ramm
  2017-10-07 11:25   ` Henning Hraban Ramm
  0 siblings, 1 reply; 12+ messages in thread
From: Henning Hraban Ramm @ 2017-10-06 15:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 2017-09-28 um 01:16 schrieb Hans Hagen <pragma@wxs.nl>:

> On 9/27/2017 11:08 PM, Thomas A. Schmitz wrote:
>> On 09/27/2017 10:25 PM, Henning Hraban Ramm wrote:
>>> Thank you for the suggestion.
>>> I tried
>>> 
>>> \replaceword[eka][Auflage][Au{fl}age]
>>> \setreplacements[eka]
>>> 
>>> and even converted the german wordlist from the selnolig package, but it doesn’t help.
>> Works here. You'll have to make a real example.
> I'll add an extra (simple) definition format:
> 
> \replaceword [eka] [Au{fl}age Shiff{f}ahrt]
> 
> I leave it to others to collect (reasonable) lists of words. We can these to the distribution then.

Thank you very much, it works now.
Here’s* the converted German wordlist from the selnolig package, still in the "old" single word syntax.
I just \input it in my environment. I didn’t measure, but I don’t experience a delay - great!

I’ll also add a wiki page about ligatures.**

*) The message didn’t make it to the list on the first try, because the attachment was too big.
It’s now at http://wiki.contextgarden.net/images/b/be/nolig-german-wordlist.tex
**) http://wiki.contextgarden.net/Ligatures

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD


___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-06 15:21 ` Fwd: ligature exceptions Henning Hraban Ramm
@ 2017-10-07 11:25   ` Henning Hraban Ramm
  2017-10-07 19:21     ` Pablo Rodriguez
  0 siblings, 1 reply; 12+ messages in thread
From: Henning Hraban Ramm @ 2017-10-07 11:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]

I rejoiced too early:
While the ligature exception handling works with some of the default fonts (lm, termes, pagella), it fails with the Alegreya fonts that I’m using.
I’d be glad if someone (you?) could look into my attached typescript file or even try downloading the fonts* to check what’s going on.

*) https://fonts.google.com/?selection.family=Alegreya|Alegreya+SC|Alegreya+Sans|Alegreya+Sans+SC

\mainlanguage[de]

%\usetypescriptfile	[type-alegreya]
%\usetypescript	[alegreya-light]
%\setupbodyfont	[alegreya,rm,16pt]
\setupbodyfont	[termes,rm,16pt]

\definefontfeature[default]
[mode=node,kern=yes,
liga=yes,tlig=yes,
ccmp=yes,language=dflt,
protrusion=quality,
expansion=quality]

\replaceword[eka][Auflage][Au{fl}age]
\replaceword[eka][Kampffront][Kamp{ff}ront]

\starttext
falsch: Auflage Kampffront

richtig: Au\noligature{fl}age Kamp\noligature{ff}ront

\setreplacements[eka]
richtig: Auflage Kampffront
\stoptext



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

[-- Attachment #2: type-alegreya.tex --]
[-- Type: application/octet-stream, Size: 8005 bytes --]

\definefontfeature
[alefeatures]
[mode=node,kern=yes,
  tlig=yes,liga=yes,
  ccmp=yes,language=dflt,
  protrusion=quality,
  expansion=quality]

\starttypescript [sans] [alegreya,alegreya-light,alegreya-medium]
  %\setups[font:fallback:serif]
  \definefontsynonym[AlegreyaSans-Thin]             [name:AlegreyaSans-Thin]
  \definefontsynonym[AlegreyaSans-ThinItalic]       [name:AlegreyaSans-ThinItalic]
  \definefontsynonym[AlegreyaSans-ThinCaps]         [name:AlegreyaSansSC-Thin]
  \definefontsynonym[AlegreyaSans-ThinItalicCaps]   [name:AlegreyaSansSC-ThinItalic]
  \definefontsynonym[AlegreyaSans-Light]            [name:AlegreyaSans-Light]
  \definefontsynonym[AlegreyaSans-LightItalic]      [name:AlegreyaSans-LightItalic]
  \definefontsynonym[AlegreyaSans-LightCaps]        [name:AlegreyaSansSC-Light]
  \definefontsynonym[AlegreyaSans-LightItalicCaps]  [name:AlegreyaSansSC-LightItalic]
  \definefontsynonym[AlegreyaSans-Regular]          [name:AlegreyaSans-Regular]
  \definefontsynonym[AlegreyaSans-Italic]           [name:AlegreyaSans-Italic]
  \definefontsynonym[AlegreyaSans-Caps]             [name:AlegreyaSansSC-Regular]
  \definefontsynonym[AlegreyaSans-ItalicCaps]       [name:AlegreyaSansSC-Italic]
  \definefontsynonym[AlegreyaSans-Medium]           [name:AlegreyaSans-Medium]
  \definefontsynonym[AlegreyaSans-MediumItalic]     [name:AlegreyaSans-MediumItalic]
  \definefontsynonym[AlegreyaSans-MediumCaps]       [name:AlegreyaSansSC-Medium]
  \definefontsynonym[AlegreyaSans-MediumItalicCaps] [name:AlegreyaSansSC-MediumItalic]
  \definefontsynonym[AlegreyaSans-Bold]             [name:AlegreyaSans-Bold]
  \definefontsynonym[AlegreyaSans-BoldItalic]       [name:AlegreyaSans-BoldItalic]
  \definefontsynonym[AlegreyaSans-BoldCaps]         [name:AlegreyaSansSC-Bold]
  \definefontsynonym[AlegreyaSans-BoldItalicCaps]   [name:AlegreyaSansSC-BoldItalic]
  \definefontsynonym[AlegreyaSans-ExtraBold]        [name:AlegreyaSans-ExtraBold]
  \definefontsynonym[AlegreyaSans-ExtraBoldItalic]  [name:AlegreyaSans-ExtraBoldItalic]
  \definefontsynonym[AlegreyaSans-ExtraBoldCaps]    [name:AlegreyaSansSC-ExtraBold]
  \definefontsynonym[AlegreyaSans-ExtraBoldItalicCaps][name:AlegreyaSansSC-ExtraBoldItalic]
  \definefontsynonym[AlegreyaSans-Black]             [name:AlegreyaSans-Black]
  \definefontsynonym[AlegreyaSans-BlackItalic]       [name:AlegreyaSans-BlackItalic]
  \definefontsynonym[AlegreyaSans-BlackCaps]         [name:AlegreyaSansSC-Black]
  \definefontsynonym[AlegreyaSans-BlackItalicCaps]   [name:AlegreyaSansSC-BlackItalic]
\stoptypescript

\starttypescript [serif] [alegreya]
  \definefontsynonym[AlegreyaSerif-Regular]         [name:Alegreya-Regular]
  \definefontsynonym[AlegreyaSerif-Italic]          [name:Alegreya-Italic]
  \definefontsynonym[AlegreyaSerif-Caps]            [name:AlegreyaSC-Regular]
  \definefontsynonym[AlegreyaSerif-Bold]            [name:Alegreya-Bold]
  \definefontsynonym[AlegreyaSerif-BoldItalic]      [name:Alegreya-BoldItalic]
  \definefontsynonym[AlegreyaSerif-BoldCaps]        [name:AlegreyaSC-Bold]
  \definefontsynonym[AlegreyaSerif-Black]           [name:Alegreya-Black]
  \definefontsynonym[AlegreyaSerif-BlackItalic]     [name:Alegreya-BlackItalic]
  \definefontsynonym[AlegreyaSerif-BlackCaps]       [name:AlegreyaSC-Black]
\stoptypescript

\starttypescript [sans] [alegreya] [name]
  %\setups[font:fallback:sans]
  \definefontsynonym [Sans]           [AlegreyaSans-Regular]     [features=alefeatures]
  \definefontsynonym [SansItalic]     [AlegreyaSans-Italic]      [features=alefeatures]
  \definefontsynonym [SansSlanted]    [AlegreyaSans-Italic]      [features=alefeatures]
  \definefontsynonym [SansBold]       [AlegreyaSans-Bold]        [features=alefeatures]
  \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic]  [features=alefeatures]
  \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic]  [features=alefeatures]
  \definefontsynonym [SansCaps]       [AlegreyaSans-Caps]        [features=alefeatures]
  \definefontsynonym [SansThin]         [AlegreyaSans-Thin]      [features=alefeatures]
  \definefontsynonym [SansThinItalic]   [AlegreyaSans-ThinItalic][features=alefeatures]
  \definefontsynonym [SansThinSlanted]  [AlegreyaSans-ThinItalic][features=alefeatures]
  \definefontsynonym [SansThinCaps]     [AlegreyaSans-ThinCaps]  [features=alefeatures]
  \definefontsynonym [SansLight]        [AlegreyaSans-Light]     [features=alefeatures]
  \definefontsynonym [SansLightItalic]  [AlegreyaSans-LightItalic][features=alefeatures]
  \definefontsynonym [SansLightSlanted] [AlegreyaSans-LightItalic][features=alefeatures]
  \definefontsynonym [SansLightCaps]    [AlegreyaSans-LightCaps]  [features=alefeatures]
  \definefontsynonym [SansMedium]       [AlegreyaSans-Medium]     [features=alefeatures]
  \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][features=alefeatures]
  \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][features=alefeatures]
\stoptypescript

\starttypescript [sans] [alegreya-light] [name]
  \definefontsynonym [Sans]           [AlegreyaSans-Light]         [features=alefeatures]
  \definefontsynonym [SansItalic]     [AlegreyaSans-LightItalic]   [features=alefeatures]
  \definefontsynonym [SansSlanted]    [AlegreyaSans-LightItalic]   [features=alefeatures]
  \definefontsynonym [SansCaps]       [AlegreyaSans-LightCaps]     [features=alefeatures]
  \definefontsynonym [SansBold]       [AlegreyaSans-Medium]        [features=alefeatures]
  \definefontsynonym [SansBoldItalic] [AlegreyaSans-MediumItalic]  [features=alefeatures]
  \definefontsynonym [SansBoldSlanted][AlegreyaSans-MediumItalic]  [features=alefeatures]
\stoptypescript

\starttypescript [sans] [alegreya-medium] [name]
  \definefontsynonym [Sans]           [AlegreyaSans-Medium]         [features=alefeatures]
  \definefontsynonym [SansItalic]     [AlegreyaSans-MediumItalic]   [features=alefeatures]
  \definefontsynonym [SansSlanted]    [AlegreyaSans-MediumItalic]   [features=alefeatures]
  \definefontsynonym [SansCaps]       [AlegreyaSans-MediumCaps]     [features=alefeatures]
  \definefontsynonym [SansBold]       [AlegreyaSans-ExtraBold]        [features=alefeatures]
  \definefontsynonym [SansBoldItalic] [AlegreyaSans-ExtraBoldItalic]  [features=alefeatures]
  \definefontsynonym [SansBoldSlanted][AlegreyaSans-ExtraBoldItalic]  [features=alefeatures]
\stoptypescript

\starttypescript [serif] [alegreya] [name]
  \definefontsynonym [Serif]           [AlegreyaSerif-Regular]     [features=alefeatures]
  \definefontsynonym [SerifItalic]     [AlegreyaSerif-Italic]      [features=alefeatures]
  \definefontsynonym [SerifSlanted]    [AlegreyaSerif-Italic]      [features=alefeatures]
  \definefontsynonym [SerifBold]       [AlegreyaSerif-Bold]        [features=alefeatures]
  \definefontsynonym [SerifBoldItalic] [AlegreyaSerif-BoldItalic]  [features=alefeatures]
  \definefontsynonym [SerifBoldSlanted][AlegreyaSerif-BoldItalic]  [features=alefeatures]
  \definefontsynonym [SerifCaps]       [AlegreyaSerif-Caps]        [features=alefeatures]
\stoptypescript

\starttypescript [alegreya]
  \definetypeface [alegreya] [rm] [serif] [alegreya] [default]
  \definetypeface [alegreya] [ss] [sans]  [alegreya]  [default]
  \definetypeface [alegreya] [tt] [mono]  [modern]   [default]
  \definetypeface [alegreya] [mm] [math]  [default]   [default]
\stoptypescript

\starttypescript [alegreya-light]
  \definetypeface [alegreya] [rm] [serif] [alegreya] [default]
  \definetypeface [alegreya] [ss] [sans]  [alegreya-light]  [default]
  \definetypeface [alegreya] [tt] [mono]  [modern]   [default]
  \definetypeface [alegreya] [mm] [math]  [default]   [default]
\stoptypescript

\starttypescript [alegreya-medium]
  \definetypeface [alegreya] [rm] [serif] [alegreya] [default]
  \definetypeface [alegreya] [ss] [sans]  [alegreya-medium]  [default]
  \definetypeface [alegreya] [tt] [mono]  [modern]   [default]
  \definetypeface [alegreya] [mm] [math]  [default]   [default]
\stoptypescript

[-- Attachment #3: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 11:25   ` Henning Hraban Ramm
@ 2017-10-07 19:21     ` Pablo Rodriguez
  2017-10-07 20:24       ` Henning Hraban Ramm
                         ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Pablo Rodriguez @ 2017-10-07 19:21 UTC (permalink / raw)
  To: ntg-context

On 10/07/2017 01:25 PM, Henning Hraban Ramm wrote:
> I rejoiced too early:
> While the ligature exception handling works with some of the default
> fonts (lm, termes, pagella), it fails with the Alegreya fonts that I’m
> using.

The Brill fonts don’t work either (http://www.brill.com/about/brill-fonts).

    \definefontfamily[mainfont][rm][Alegreya]
    \definefontfamily[otherfont][rm][Brill]
    \setupbodyfont [mainfont,16pt]

    \starttext
    \startTEXpage[offset=1em]
    \startbuffer
    falsch: Auflage Kampffront

    richtig: Au\noligature{fl}age Kamp\noligature{ff}ront

    \setreplacements[eka]
    richtig: Auflage Kampffront

    f ft fl fk fb ff

    f f\/t f\/l f\/k f\/b f\/f
    \resetreplacements
    \stopbuffer

    \getbuffer

    \setupbodyfont[times]\getbuffer

    \setupbodyfont[otherfont]\getbuffer
    \stopTEXpage
    \stoptext

Both Alegreya and Brill don’t replace the ligature with a single glyph,
but replace the first glyph (only, as far as I know).

I don’t know which is the way to solve it, but this might be the cause.

Just in case it helps,

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 19:21     ` Pablo Rodriguez
@ 2017-10-07 20:24       ` Henning Hraban Ramm
  2017-10-07 22:14       ` Hans Hagen
  2017-10-07 22:22       ` Hans Hagen
  2 siblings, 0 replies; 12+ messages in thread
From: Henning Hraban Ramm @ 2017-10-07 20:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2017-10-07 um 21:21 schrieb Pablo Rodriguez <oinos@gmx.es>:

> Both Alegreya and Brill don’t replace the ligature with a single glyph,
> but replace the first glyph (only, as far as I know).
> 
> I don’t know which is the way to solve it, but this might be the cause.

Oh, yes. Thanks for the analysis. I get the startligature-f also on hyphenation, like in auf-fällig, so that the arc of the first f (that is supposed to touch the second) reaches over the hyphen.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 19:21     ` Pablo Rodriguez
  2017-10-07 20:24       ` Henning Hraban Ramm
@ 2017-10-07 22:14       ` Hans Hagen
  2017-10-07 22:44         ` Pablo Rodriguez
  2017-10-08 12:16         ` Henning Hraban Ramm
  2017-10-07 22:22       ` Hans Hagen
  2 siblings, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2017-10-07 22:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Pablo Rodriguez

On 10/7/2017 9:21 PM, Pablo Rodriguez wrote:
> On 10/07/2017 01:25 PM, Henning Hraban Ramm wrote:
>> I rejoiced too early:
>> While the ligature exception handling works with some of the default
>> fonts (lm, termes, pagella), it fails with the Alegreya fonts that I’m
>> using.

forget about Algreya as it's a useless font ... it has no kerns, no 
ligatures, no features at all so the f an whatever follows will always 
touch or overlap due to the design

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 19:21     ` Pablo Rodriguez
  2017-10-07 20:24       ` Henning Hraban Ramm
  2017-10-07 22:14       ` Hans Hagen
@ 2017-10-07 22:22       ` Hans Hagen
  2017-10-08  8:37         ` Pablo Rodriguez
  2017-10-08 12:17         ` Henning Hraban Ramm
  2 siblings, 2 replies; 12+ messages in thread
From: Hans Hagen @ 2017-10-07 22:22 UTC (permalink / raw)
  To: ntg-context

On 10/7/2017 9:21 PM, Pablo Rodriguez wrote:

> The Brill fonts don’t work either (http://www.brill.com/about/brill-fonts).
> 
>      \definefontfamily[mainfont][rm][Alegreya]
>      \definefontfamily[otherfont][rm][Brill]
>      \setupbodyfont [mainfont,16pt]
> 
>      \starttext
>      \startTEXpage[offset=1em]
>      \startbuffer
>      falsch: Auflage Kampffront
> 
>      richtig: Au\noligature{fl}age Kamp\noligature{ff}ront
> 
>      \setreplacements[eka]
>      richtig: Auflage Kampffront
> 
>      f ft fl fk fb ff
> 
>      f f\/t f\/l f\/k f\/b f\/f
>      \resetreplacements
>      \stopbuffer
> 
>      \getbuffer
> 
>      \setupbodyfont[times]\getbuffer
> 
>      \setupbodyfont[otherfont]\getbuffer
>      \stopTEXpage
>      \stoptext
You need to define features before fonts get defined because we share 
font definitions and their features as much as possible

\startluacode
     fonts.handlers.otf.addfeature {
         name = "kernligatures",
         type = "kern",
         data = {
             f = { i = 50, l = 50 },
         }
     }
\stopluacode

\blockligatures[u:fl:a]

Now we can use them

\definefontfamily[mainfont][rm][Brill]
\definefontfamily[mainfont][tt][Dejavu]

\setupbodyfont[mainfont]

\definefontfeature[default:b][default][blockligatures=yes]
\definefontfeature[default:k][default][blockligatures=yes,kernligatures=yes]

\showfontkerns

\starttext

{\definedfont[Serif*default   @ 11pt]auflage}\par
{\definedfont[Serif*default:b @ 11pt]auflage}\par
{\definedfont[Serif*default:k @ 11pt]auflage}\par

\stoptext

so, you need to add a kern too because brill assumes ligatures to be applied

as usual with tex .. there's always a way out but not always a trivial 
one and of course all this gets forgotten and/or lost in the flood of 
solutions

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 22:14       ` Hans Hagen
@ 2017-10-07 22:44         ` Pablo Rodriguez
  2017-10-08 12:16         ` Henning Hraban Ramm
  1 sibling, 0 replies; 12+ messages in thread
From: Pablo Rodriguez @ 2017-10-07 22:44 UTC (permalink / raw)
  To: ntg-context

On 10/08/2017 12:14 AM, Hans Hagen wrote:
> On 10/7/2017 9:21 PM, Pablo Rodriguez wrote:
> [...]
> forget about Algreya as it's a useless font ... it has no kerns, no 
> ligatures, no features at all so the f an whatever follows will always 
> touch or overlap due to the design

In fact, the full version is a commercial typeface:
https://www.myfonts.com/fonts/huertatipografica/alegreya-ht-pro/.

I wonder whether it makes sense to have a free font that only contains
the shapes and just nothing more.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 22:22       ` Hans Hagen
@ 2017-10-08  8:37         ` Pablo Rodriguez
  2017-10-08 12:54           ` Henning Hraban Ramm
  2017-10-08 12:17         ` Henning Hraban Ramm
  1 sibling, 1 reply; 12+ messages in thread
From: Pablo Rodriguez @ 2017-10-08  8:37 UTC (permalink / raw)
  To: ntg-context

On 10/08/2017 12:22 AM, Hans Hagen wrote:
> You need to define features before fonts get defined because we share 
> font definitions and their features as much as possible
> 
> \startluacode
>      fonts.handlers.otf.addfeature {
>          name = "kernligatures",
>          type = "kern",
>          data = {
>              f = { i = 50, l = 50 },
>          }
>      }
> \stopluacode

Many thanks for your reply, Hans.

I almost get it all ;-), but what is the "i" variable?

Setting different values or even removing doesn’t make any difference
(at least, that I notice).

Many thanks for your help again,

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 22:14       ` Hans Hagen
  2017-10-07 22:44         ` Pablo Rodriguez
@ 2017-10-08 12:16         ` Henning Hraban Ramm
  1 sibling, 0 replies; 12+ messages in thread
From: Henning Hraban Ramm @ 2017-10-08 12:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2017-10-08 um 00:14 schrieb Hans Hagen <pragma@wxs.nl>:

> On 10/7/2017 9:21 PM, Pablo Rodriguez wrote:
>> On 10/07/2017 01:25 PM, Henning Hraban Ramm wrote:
>>> I rejoiced too early:
>>> While the ligature exception handling works with some of the default
>>> fonts (lm, termes, pagella), it fails with the Alegreya fonts that I’m
>>> using.
> 
> forget about Algreya as it's a useless font ... it has no kerns, no ligatures, no features at all so the f an whatever follows will always touch or overlap due to the design

I can’t agree - it’s beautifully designed, and I can’t complain about its kerning. It also responds to tlig or liga features, even if they’re implemented as single (i.e. not ligature) glyphs (there are e.g. different f glyphs). Maybe it’s set up in a strange way, but I don’t think it’s that bad. Of course I don’t have your level of insight.

My problem with Alegreya’s *design* it just that it’s not very well suited for digital printing, it needs a high resolution to look good.

Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-07 22:22       ` Hans Hagen
  2017-10-08  8:37         ` Pablo Rodriguez
@ 2017-10-08 12:17         ` Henning Hraban Ramm
  1 sibling, 0 replies; 12+ messages in thread
From: Henning Hraban Ramm @ 2017-10-08 12:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2017-10-08 um 00:22 schrieb Hans Hagen <pragma@wxs.nl>:

> On 10/7/2017 9:21 PM, Pablo Rodriguez wrote:
> You need to define features before fonts get defined because we share font definitions and their features as much as possible
> 
> \startluacode
>    fonts.handlers.otf.addfeature {
>        name = "kernligatures",
>        type = "kern",
>        data = {
>            f = { i = 50, l = 50 },
>        }
>    }
> \stopluacode
> 
> \blockligatures[u:fl:a]
> 
> Now we can use them
> 
> \definefontfamily[mainfont][rm][Brill]
> \definefontfamily[mainfont][tt][Dejavu]
> 
> \setupbodyfont[mainfont]
> 
> \definefontfeature[default:b][default][blockligatures=yes]
> \definefontfeature[default:k][default][blockligatures=yes,kernligatures=yes]

Thank you very much, that helps! I’m working on a set of exceptions...



Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-08  8:37         ` Pablo Rodriguez
@ 2017-10-08 12:54           ` Henning Hraban Ramm
  2017-10-08 16:19             ` Pablo Rodriguez
  0 siblings, 1 reply; 12+ messages in thread
From: Henning Hraban Ramm @ 2017-10-08 12:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2017-10-08 um 10:37 schrieb Pablo Rodriguez <oinos@gmx.es>:

> On 10/08/2017 12:22 AM, Hans Hagen wrote:
>> You need to define features before fonts get defined because we share 
>> font definitions and their features as much as possible
>> 
>> \startluacode
>>     fonts.handlers.otf.addfeature {
>>         name = "kernligatures",
>>         type = "kern",
>>         data = {
>>             f = { i = 50, l = 50 },
>>         }
>>     }
>> \stopluacode
> 
> Many thanks for your reply, Hans.
> 
> I almost get it all ;-), but what is the "i" variable?

It defines the kerning between f and i. I also added "f" and "b".

And after playing with the values and setting up exceptions I understand now why Hans hates the Alegreya font(s):
While the kerning works, the font still uses the long-arced f (that is meant for creating ligatures).

I still like the design, but will consider different fonts for upcoming books.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: ligature exceptions
  2017-10-08 12:54           ` Henning Hraban Ramm
@ 2017-10-08 16:19             ` Pablo Rodriguez
  0 siblings, 0 replies; 12+ messages in thread
From: Pablo Rodriguez @ 2017-10-08 16:19 UTC (permalink / raw)
  To: ntg-context

On 10/08/2017 02:54 PM, Henning Hraban Ramm wrote:
> Am 2017-10-08 um 10:37 schrieb Pablo Rodriguez:
>> On 10/08/2017 12:22 AM, Hans Hagen wrote:
>> Many thanks for your reply, Hans.
>>
>> I almost get it all ;-), but what is the "i" variable?
> 
> It defines the kerning between f and i. I also added "f" and "b".

Many thanks for the replies, both Hans and Hraban.

I didn’t notice any change in my sample because I only tested the fl pair.

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-10-08 16:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <009E164E-926C-4014-94BC-704EFDFF5228@fiee.net>
2017-10-06 15:21 ` Fwd: ligature exceptions Henning Hraban Ramm
2017-10-07 11:25   ` Henning Hraban Ramm
2017-10-07 19:21     ` Pablo Rodriguez
2017-10-07 20:24       ` Henning Hraban Ramm
2017-10-07 22:14       ` Hans Hagen
2017-10-07 22:44         ` Pablo Rodriguez
2017-10-08 12:16         ` Henning Hraban Ramm
2017-10-07 22:22       ` Hans Hagen
2017-10-08  8:37         ` Pablo Rodriguez
2017-10-08 12:54           ` Henning Hraban Ramm
2017-10-08 16:19             ` Pablo Rodriguez
2017-10-08 12:17         ` Henning Hraban Ramm

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).