ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
@ 2011-02-25 15:37 Heilmann, Till A.
  2011-02-25 15:45 ` Ulrike Fischer
  0 siblings, 1 reply; 9+ messages in thread
From: Heilmann, Till A. @ 2011-02-25 15:37 UTC (permalink / raw)
  To: ntg-context

Am Fri, 25 Feb 2011 14:41:10 +0100 schrieb Ulrike Fischer:

>> In base mode kerning and and hyphenation 
>> happen in the traditional tex way, so there is not much extra trickery 
>> taking place.
> 
> Well, as you mention "base mode": This reminded me that I had to
> force base mode to get my reencoding to work in latex. So I tried in
> context + latex/luaotfload (with german hyphenation patterns):
> 
> [...]
> 
> And bingo: with mode=base it works in both formats, with mode=node
> the kern disappears. Without mode declaration the kern disappears in
> latex.

Ah, yes, the transcript of my first example clearly shows fontspec operating in node mode.

Please excuse my naive asking: Is there any way to continue using fontspec's setmainfont command (it is convenient for someone unexperienced like me) and at the same force luaotfload into using base mode?

Thanks,
- Till
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re:  Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
  2011-02-25 15:37 Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX Heilmann, Till A.
@ 2011-02-25 15:45 ` Ulrike Fischer
  2011-02-25 15:56   ` Ulrike Fischer
  2011-02-25 16:07   ` Hyphenation patterns and adjusted kerning:?ConTeXt " Khaled Hosny
  0 siblings, 2 replies; 9+ messages in thread
From: Ulrike Fischer @ 2011-02-25 15:45 UTC (permalink / raw)
  To: ntg-context

Am Fri, 25 Feb 2011 16:37:26 +0100 schrieb Heilmann, Till A.:

> Am Fri, 25 Feb 2011 14:41:10 +0100 schrieb Ulrike Fischer:
> 
>>> In base mode kerning and and hyphenation 
>>> happen in the traditional tex way, so there is not much extra trickery 
>>> taking place.
>> 
>> Well, as you mention "base mode": This reminded me that I had to
>> force base mode to get my reencoding to work in latex. So I tried in
>> context + latex/luaotfload (with german hyphenation patterns):
>> 
>> [...]
>> 
>> And bingo: with mode=base it works in both formats, with mode=node
>> the kern disappears. Without mode declaration the kern disappears in
>> latex.
> 
> Ah, yes, the transcript of my first example clearly shows fontspec operating in node mode.
 
> Please excuse my naive asking: Is there any way to continue using
> fontspec's setmainfont command (it is convenient for someone
> unexperienced like me) and at the same force luaotfload into
> using base mode?

The following seems to work:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\setmainfont[RawFeature={mode=base},FeatureFile=bonum.fea]{TeX Gyre
Bonum}
\begin{document}
fh aufhalten
\end{document}



-- 
Ulrike Fischer 

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re:  Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
  2011-02-25 15:45 ` Ulrike Fischer
@ 2011-02-25 15:56   ` Ulrike Fischer
  2011-02-25 16:07   ` Hyphenation patterns and adjusted kerning:?ConTeXt " Khaled Hosny
  1 sibling, 0 replies; 9+ messages in thread
From: Ulrike Fischer @ 2011-02-25 15:56 UTC (permalink / raw)
  To: ntg-context

Am Fri, 25 Feb 2011 16:45:31 +0100 schrieb Ulrike Fischer:

>> Ah, yes, the transcript of my first example clearly shows fontspec operating in node mode.

Yes, but I could also reproduce the problem without fontspec (only
with luaotfload).
  
>> Please excuse my naive asking: Is there any way to continue using
>> fontspec's setmainfont command (it is convenient for someone
>> unexperienced like me) and at the same force luaotfload into
>> using base mode?
> 
> The following seems to work:
> 
> \documentclass{article}
> \usepackage[ngerman]{babel}
> \usepackage{fontspec}
> \setmainfont[RawFeature={mode=base},FeatureFile=bonum.fea]{TeX Gyre
> Bonum}
> \begin{document}
> fh aufhalten
> \end{document}

And after a look in the fontspec code:

\setmainfont[Renderer=Basic,FeatureFile=bonum.fea]{TeX Gyre Bonum}
-- 
Ulrike Fischer 

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Hyphenation patterns and adjusted kerning:?ConTeXt vs. LuaTeX
  2011-02-25 15:45 ` Ulrike Fischer
  2011-02-25 15:56   ` Ulrike Fischer
@ 2011-02-25 16:07   ` Khaled Hosny
  1 sibling, 0 replies; 9+ messages in thread
From: Khaled Hosny @ 2011-02-25 16:07 UTC (permalink / raw)
  To: news3, mailing list for ConTeXt users

On Fri, Feb 25, 2011 at 04:45:31PM +0100, Ulrike Fischer wrote:
> > Ah, yes, the transcript of my first example clearly shows fontspec operating in node mode.
>  
> > Please excuse my naive asking: Is there any way to continue using
> > fontspec's setmainfont command (it is convenient for someone
> > unexperienced like me) and at the same force luaotfload into
> > using base mode?
> 
> The following seems to work:
> 
> \documentclass{article}
> \usepackage[ngerman]{babel}
> \usepackage{fontspec}
> \setmainfont[RawFeature={mode=base},FeatureFile=bonum.fea]{TeX Gyre Bonum}

Better "Renderer=Basic".

-- 
 Khaled Hosny
 Egyptian
 Arab
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
  2011-02-25 14:41   ` Ulrike Fischer
@ 2011-02-25 16:00     ` Khaled Hosny
  0 siblings, 0 replies; 9+ messages in thread
From: Khaled Hosny @ 2011-02-25 16:00 UTC (permalink / raw)
  To: news3, mailing list for ConTeXt users

On Fri, Feb 25, 2011 at 03:41:10PM +0100, Ulrike Fischer wrote:
> So I think it isn't true that the manual of luaotfload claims "By
> default mode=base is used". 

It used to be like that but we changed it a while ago, looks like I
didn't update the manual.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
@ 2011-02-25 15:57 Heilmann, Till A.
  0 siblings, 0 replies; 9+ messages in thread
From: Heilmann, Till A. @ 2011-02-25 15:57 UTC (permalink / raw)
  To: ntg-context

Am Fri, 25 Feb 2011 16:45:31 +0100 schrieb Ulrike Fischer:

>> Please excuse my naive asking: Is there any way to continue using
>> fontspec's setmainfont command (it is convenient for someone
>> unexperienced like me) and at the same force luaotfload into
>> using base mode?
>> 
> 
> The following seems to work:
> 
> \documentclass{article}
> \usepackage[ngerman]{babel}
> \usepackage{fontspec}
> \setmainfont[RawFeature={mode=base},FeatureFile=bonum.fea]{TeX Gyre
> Bonum}
> \begin{document}
> fh aufhalten
> \end{document}

Oh joy! Thank you all, once again, for your help. It is much appreciated.

(The downside: Now that I can, I have no choice but to actually fix all the terrible kerning mistakes in TeX Gyre Bonum. Hours and hours of work. Sigh...)

- Till
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
  2011-02-25 13:35 ` Hans Hagen
@ 2011-02-25 14:41   ` Ulrike Fischer
  2011-02-25 16:00     ` Khaled Hosny
  0 siblings, 1 reply; 9+ messages in thread
From: Ulrike Fischer @ 2011-02-25 14:41 UTC (permalink / raw)
  To: ntg-context

Am Fri, 25 Feb 2011 14:35:10 +0100 schrieb Hans Hagen:

>> As a new LuaTeX user, I came across the following problem: Using
>> Lua(La)TeX, customized kerning of letter pairs (via the
>> FeatureFile capability of fontspec) is ignored when it coincides
>> with a possible hyphenation of a word (e.g. between 'f' and 'h'
>> in German words like 'aufhalten'; see first minimal example
>> below).

>> 1. Lua(La)TeX

> I cannot test that (I only have the context minimals installed) but I 
> don't know anything about latex internals so it would be a wild guess. 
> Maybe babel is interfering? 

No, the problem exists also if you only load the german patterns.

> In base mode kerning and and hyphenation 
> happen in the traditional tex way, so there is not much extra trickery 
> taking place.

Well, as you mention "base mode": This reminded me that I had to
force base mode to get my reencoding to work in latex. So I tried in
context + latex/luaotfload (with german hyphenation patterns):

\font\test="name:TeX Gyre
Bonum:mode=base:featurefile=bonum.fea;+kern"

and

\font\test="name:TeX Gyre
Bonum:mode=node:featurefile=bonum.fea;+kern" 

And bingo: with mode=base it works in both formats, with mode=node
the kern disappears. Without mode declaration the kern disappears in
latex. 

So I think it isn't true that the manual of luaotfload claims "By
default mode=base is used". 



-- 
Ulrike Fischer 

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
  2011-02-25 12:18 Heilmann, Till A.
@ 2011-02-25 13:35 ` Hans Hagen
  2011-02-25 14:41   ` Ulrike Fischer
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2011-02-25 13:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Heilmann, Till A.

On 25-2-2011 1:18, Heilmann, Till A. wrote:
> Maybe the ConTeXt community can be of assistance to the LuaTeX bunch ...
>
> As a new LuaTeX user, I came across the following problem: Using Lua(La)TeX, customized kerning of letter pairs (via the FeatureFile capability of fontspec) is ignored when it coincides with a possible hyphenation of a word (e.g. between 'f' and 'h' in German words like 'aufhalten'; see first minimal example below).
>
> Ulrike Fischer was so kind to point out two things (http://tug.org/pipermail/luatex/2011-February/002569.html): First, the problem seems to be the break points between the adjusted kerning pairs. Second, ConTeXt seems to handle this case correctly (see second minimal example below; feature file bonum.fea from first example required).
>
> I am no expert in neither LuaTeX nor context, but Ulrike suggested I post here and ask if the (typographically correct) ConTeXt behavior or solution can be reproduced with Lua(La)TeX.
>
> Thanks,
> - Till
>
> 1. Lua(La)TeX
>
> \begin{filecontents*}{bonum.fea}
> languagesystem DFLT dflt;
> languagesystem latn dflt;
> feature kern {
> pos f h 100;
> } kern;
> \end{filecontents*}
> \documentclass{article}
> \usepackage[ngerman]{babel}
> \usepackage{fontspec}
> \setmainfont[FeatureFile=bonum.fea]{TeX Gyre Bonum}
> \begin{document}
> fh aufhalten
> \end{document}

I cannot test that (I only have the context minimals installed) but I 
don't know anything about latex internals so it would be a wild guess. 
Maybe babel is interfering?  In base mode kerning and and hyphenation 
happen in the traditional tex way, so there is not much extra trickery 
taking place.

> 2. ConTeXt
>
> \mainlanguage	[de]
> \definefontfeature[test][featurefile=bonum,kern=yes]
> \definefont[test][name:texgyrebonum*test]
> \starttext
> \test fh aufhalten
> \stoptext

Indeed I see a kern.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX
@ 2011-02-25 12:18 Heilmann, Till A.
  2011-02-25 13:35 ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Heilmann, Till A. @ 2011-02-25 12:18 UTC (permalink / raw)
  To: ntg-context

Maybe the ConTeXt community can be of assistance to the LuaTeX bunch ...

As a new LuaTeX user, I came across the following problem: Using Lua(La)TeX, customized kerning of letter pairs (via the FeatureFile capability of fontspec) is ignored when it coincides with a possible hyphenation of a word (e.g. between 'f' and 'h' in German words like 'aufhalten'; see first minimal example below).

Ulrike Fischer was so kind to point out two things (http://tug.org/pipermail/luatex/2011-February/002569.html): First, the problem seems to be the break points between the adjusted kerning pairs. Second, ConTeXt seems to handle this case correctly (see second minimal example below; feature file bonum.fea from first example required).

I am no expert in neither LuaTeX nor context, but Ulrike suggested I post here and ask if the (typographically correct) ConTeXt behavior or solution can be reproduced with Lua(La)TeX.

Thanks,
- Till

1. Lua(La)TeX

\begin{filecontents*}{bonum.fea}
languagesystem DFLT dflt;
languagesystem latn dflt;
feature kern {
pos f h 100;
} kern;
\end{filecontents*}
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\setmainfont[FeatureFile=bonum.fea]{TeX Gyre Bonum}
\begin{document}
fh aufhalten
\end{document}

2. ConTeXt

\mainlanguage	[de]
\definefontfeature[test][featurefile=bonum,kern=yes]
\definefont[test][name:texgyrebonum*test]
\starttext
\test fh aufhalten
\stoptext


___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2011-02-25 16:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-25 15:37 Hyphenation patterns and adjusted kerning: ConTeXt vs. LuaTeX Heilmann, Till A.
2011-02-25 15:45 ` Ulrike Fischer
2011-02-25 15:56   ` Ulrike Fischer
2011-02-25 16:07   ` Hyphenation patterns and adjusted kerning:?ConTeXt " Khaled Hosny
  -- strict thread matches above, loose matches on Subject: below --
2011-02-25 15:57 Hyphenation patterns and adjusted kerning: ConTeXt " Heilmann, Till A.
2011-02-25 12:18 Heilmann, Till A.
2011-02-25 13:35 ` Hans Hagen
2011-02-25 14:41   ` Ulrike Fischer
2011-02-25 16:00     ` Khaled Hosny

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