Re: [NTG-context] (bug?) wrong hyphenation with external fonts

2016-02-05 Thread Hans Hagen

On 2/5/2016 8:47 AM, Pablo Rodriguez wrote:

On 02/04/2016 10:13 PM, Hans Hagen wrote:

On 2/4/2016 9:27 PM, Pablo Rodriguez wrote:

[...]
The ff-ligature prevents hyphenation with TeX Gyre Pagella, but not with
MinionPro. (This is the opposite of what I reported before.)


it depends on the complexity of the ligature .. ff is not so much an
issue but you can have ff + i = ffi etc and we need to deal with kerning
too (it depends a bit on how the opentype features are applied and we
can handle quite some weird ligature implementations)

the latest mechanism in context can deal with quite some situations but
at some point has to make decisions (in order not to loose for instance
kerns; double chained ligatures would result in way more overhead and is
not worth the trouble)

one might wonder if we never had these  f[fil] ligatures of if ancient
technology had provides hundreds of them combining upto 4 characters etc
etc.


Many thanks for the explanation, Hans.

I see the decisions ConTeXt has to make may be compromises in some cases.


the f + f can become a ff glyph but also a special first or second f or 
even two special f's and the same can happen with this result and the 
following i which can become a special i, or just the i partly overlayed 
or a ligature or break the ff into f and fi or there can be no 
replacements but just kerning


tex does have a concept of chained discretionary nodes (max 2) but that 
is pretty complex; such a chained discretionary node set + complex 
ligatures is no fun to deal with and because we also want to do other 
things in context (font handling is only one of the many things we do at 
that level)


we don't want to build a solution tree of thousands of possibilities to 
feed into the par builder (the current mechanism is already quite 
complex but still quite fast too) just for the sake of an occasional 
three character ligature in latin which is not even always permitted due 
to language constraints


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] (bug?) wrong hyphenation with external fonts

2016-02-04 Thread Hans Hagen

On 2/4/2016 9:27 PM, Pablo Rodriguez wrote:

On 02/03/2016 02:18 PM, Hans Hagen wrote:

On 2/2/2016 12:28 PM, Pablo Rodriguez wrote:

Dear list,
[...]
Hyphenation is wrong with fonts that don’t come with the ConTeXt
distribution. TeX Gyre Pagella is hyphenated right, but MinionPro or
even TeX Gyre Pagella Math are wrong hyphenated.

I’m afraid it may be a bug. Could anyone confirm it?


to what extend hyphenation is supported depends on the interaction
between ligature building / kerning / trickery and possible hyohenation
points; the font handler tries to do its best


Many thanks for your reply, Hans.

I reported the issue in the opposite way it happens:

 \definefontfamily[mainface][rm][MinionPro]
 \definefontfamily[anotherface][rm][TeX Gyre Pagella]
 \setupbodyfont[mainface]

 \starttext
 \startTEXpage[offset=1em]
 \hyphenatedword{LibreOffice libre office}

 \setupbodyfont[anotherface]%
 \hyphenatedword{LibreOffice libre office}
 \stopTEXpage
 \stoptext

The ff-ligature prevents hyphenation with TeX Gyre Pagella, but not with
MinionPro. (This is the opposite of what I reported before.)


it depends on the complexity of the ligature .. ff is not so much an 
issue but you can have ff + i = ffi etc and we need to deal with kerning 
too (it depends a bit on how the opentype features are applied and we 
can handle quite some weird ligature implementations)


the latest mechanism in context can deal with quite some situations but 
at some point has to make decisions (in order not to loose for instance 
kerns; double chained ligatures would result in way more overhead and is 
not worth the trouble)


one might wonder if we never had these  f[fil] ligatures of if ancient 
technology had provides hundreds of them combining upto 4 characters etc 
etc.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] (bug?) wrong hyphenation with external fonts

2016-02-04 Thread Pablo Rodriguez
On 02/04/2016 10:13 PM, Hans Hagen wrote:
> On 2/4/2016 9:27 PM, Pablo Rodriguez wrote:
>> [...]
>> The ff-ligature prevents hyphenation with TeX Gyre Pagella, but not with
>> MinionPro. (This is the opposite of what I reported before.)
> 
> it depends on the complexity of the ligature .. ff is not so much an 
> issue but you can have ff + i = ffi etc and we need to deal with kerning 
> too (it depends a bit on how the opentype features are applied and we 
> can handle quite some weird ligature implementations)
> 
> the latest mechanism in context can deal with quite some situations but 
> at some point has to make decisions (in order not to loose for instance 
> kerns; double chained ligatures would result in way more overhead and is 
> not worth the trouble)
> 
> one might wonder if we never had these  f[fil] ligatures of if ancient 
> technology had provides hundreds of them combining upto 4 characters etc 
> etc.

Many thanks for the explanation, Hans.

I see the decisions ConTeXt has to make may be compromises in some cases.

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

Re: [NTG-context] (bug?) wrong hyphenation with external fonts

2016-02-04 Thread Pablo Rodriguez
On 02/03/2016 02:18 PM, Hans Hagen wrote:
> On 2/2/2016 12:28 PM, Pablo Rodriguez wrote:
>> Dear list,
>> [...]
>> Hyphenation is wrong with fonts that don’t come with the ConTeXt
>> distribution. TeX Gyre Pagella is hyphenated right, but MinionPro or
>> even TeX Gyre Pagella Math are wrong hyphenated.
>>
>> I’m afraid it may be a bug. Could anyone confirm it?
> 
> to what extend hyphenation is supported depends on the interaction 
> between ligature building / kerning / trickery and possible hyohenation 
> points; the font handler tries to do its best

Many thanks for your reply, Hans.

I reported the issue in the opposite way it happens:

\definefontfamily[mainface][rm][MinionPro]
\definefontfamily[anotherface][rm][TeX Gyre Pagella]
\setupbodyfont[mainface]

\starttext
\startTEXpage[offset=1em]
\hyphenatedword{LibreOffice libre office}

\setupbodyfont[anotherface]%
\hyphenatedword{LibreOffice libre office}
\stopTEXpage
\stoptext

The ff-ligature prevents hyphenation with TeX Gyre Pagella, but not with
MinionPro. (This is the opposite of what I reported before.)

> math: don't use math fonts for text

I never do it. Reported only for the record.

Sorry for the previous inaccurate report. 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] (bug?) wrong hyphenation with external fonts

2016-02-03 Thread Hans Hagen

On 2/2/2016 12:28 PM, Pablo Rodriguez wrote:

Dear list,

just accidentally I discovered the following issue:

 \definefontfamily[mainface][rm][MinionPro]
 \definefontfamily[anotherface][rm][TeX Gyre Pagella]
 % wrong hyphenation too with TeX Gyre Pagella Math
 \setupbodyfont[mainface]

 \starttext
 \startTEXpage[offset=1em]
 \hyphenatedword{LibreOffice libre office}

 \es\hyphenatedword{LibreOffice libre office}
 \stopTEXpage
 \startTEXpage[offset=1em]
 \setupbodyfont[anotherface]%
 \hyphenatedword{LibreOffice libre office}

 \es\hyphenatedword{LibreOffice libre office}
 \stopTEXpage
 \stoptext

Hyphenation is wrong with fonts that don’t come with the ConTeXt
distribution. TeX Gyre Pagella is hyphenated right, but MinionPro or
even TeX Gyre Pagella Math are wrong hyphenated.

I’m afraid it may be a bug. Could anyone confirm it?


to what extend hyphenation is supported depends on the interaction 
between ligature building / kerning / trickery and possible hyohenation 
points; the font handler tries to do its best


math: don't use math fonts for text

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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
___

Re: [NTG-context] bug in hyphenation?

2014-09-18 Thread Pablo Rodriguez
On 09/18/2014 05:55 AM, Thomas A. Schmitz wrote:
 On 17 Sep 2014, at 10:03, Pablo Rodriguez wrote:
 Hyphenation points for this word are: κοι[-||]νώ[-||]σε[-||]σθαι.

 Sorry, but I think that the bug is clear, but I don’t know how to
 provide a minimal sample.

 Many thanks for your help,
 
 Why is it difficult to provide a minimal example? I have this:
 [...] 
 Which gives me the attached output - with the expected hyphenation.
 So this is not a bug, but something is wrong in your document. And we
 won’t be able to say what unless you provide a minimal example.

Many thanks for the reply, Thomas.

My sample is the following:

\showframe
\mainlanguage[en]
\setuplanguage[en][patterns={en, agr}]
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]

\definefontfamily[mainface][serif][FreeSerif]
\setupbodyfont[mainface, 13pt]

\unexpanded\def\doCritApp#1#2#3%
   {\startlinenote[#1]{#2 #3}#2\stoplinenote[#1]}

\newcounter\MyCounter
\unexpanded\def\CritApp
   {\doglobal\increment\MyCounter
\normalexpanded{\doCritApp{Varia:\MyCounter}}}

%~ \def\CritApp#1#2{#1}

\starttext
με τὴν τέχνην ταύτην \CritApp{ἴσα}{neut. pl. acc. adverbial, “equally
to” + dat.} γενέτῃσιν ἐμοῖς, καὶ βίου \CritApp{κοινώσεσθαι}{fut. inf.
with ὄμνυμι “to be a partner of” + gen.}
\stoptext

After reading again the message that gave me the macro, hyphenation
seems to be an unsolved issue with that command.

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

Re: [NTG-context] bug in hyphenation?

2014-09-18 Thread Thomas A. Schmitz
So your problem has nothing to do with Greek hyphenation, it’s about the way 
you define your \CritApp command. You could have shown the same problem with an 
English text. It appears that injecting the word via your macro breaks 
hyphenation, but I assume Hans and Wolfgang  will know better about that. 
Example without Greek:

\showframe
\mainlanguage[en]
\setuplanguage[en][patterns={en, agr}]
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]

\definefontfamily[mainface][serif][FreeSerif]
\setupbodyfont[mainface, 13pt]

\unexpanded\def\doCritApp#1#2#3%
  {\startlinenote[#1]{#2 #3}#2\stoplinenote[#1]}

\newcounter\MyCounter
\unexpanded\def\CritApp
  {\doglobal\increment\MyCounter
   \normalexpanded{\doCritApp{Varia:\MyCounter}}}

\starttext
supercalifragilisticexpialidocious
\CritApp{supercalifragilisticexpialidocious}{test}
\stoptext


On 18 Sep 2014, at 08:33, Pablo Rodriguez oi...@gmx.es wrote:

 Many thanks for the reply, Thomas.
 
 My sample is the following:
 
 \showframe
 \mainlanguage[en]
 \setuplanguage[en][patterns={en, agr}]
 \definepapersize[HippPaper][width=6in, height=9in]
 \setuppapersize[HippPaper]
 
 \definefontfamily[mainface][serif][FreeSerif]
 \setupbodyfont[mainface, 13pt]
 
 \unexpanded\def\doCritApp#1#2#3%
   {\startlinenote[#1]{#2 #3}#2\stoplinenote[#1]}
 
 \newcounter\MyCounter
 \unexpanded\def\CritApp
   {\doglobal\increment\MyCounter
\normalexpanded{\doCritApp{Varia:\MyCounter}}}
 
 %~ \def\CritApp#1#2{#1}
 
 \starttext
 με τὴν τέχνην ταύτην \CritApp{ἴσα}{neut. pl. acc. adverbial, “equally
 to” + dat.} γενέτῃσιν ἐμοῖς, καὶ βίου \CritApp{κοινώσεσθαι}{fut. inf.
 with ὄμνυμι “to be a partner of” + gen.}
 \stoptext
 
 After reading again the message that gave me the macro, hyphenation
 seems to be an unsolved issue with that command.
 
 Many tganks for your help,

--
Prof. Dr. Thomas A. Schmitz
Geschäftsführender Direktor
Institut für Klassische und Romanische Philologie
Universität Bonn
Am Hof 1e
53113 Bonn
http://www.philologie.uni-bonn.de/personal/schmitz

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

Re: [NTG-context] bug in hyphenation?

2014-09-17 Thread Pablo Rodriguez
Hi Thangalin,

I use \hsize\zeropoint to force ConTeXt to break lines at every
hyphenation point.

I found a bug in a Greek edition of the Hippocratic oath I’m trying to
typeset. Last line from the first page
http://www.ousia.tk/hippocratic-oath.pdf.

Hyphenation points for this word are: κοι[-||]νώ[-||]σε[-||]σθαι.

Sorry, but I think that the bug is clear, but I don’t know how to
provide a minimal sample.

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

Re: [NTG-context] bug in hyphenation?

2014-09-17 Thread Thomas A. Schmitz

On 17 Sep 2014, at 10:03, Pablo Rodriguez oi...@gmx.es wrote:

 I found a bug in a Greek edition of the Hippocratic oath I’m trying to
 typeset. Last line from the first page
 http://www.ousia.tk/hippocratic-oath.pdf.
 
 Hyphenation points for this word are: κοι[-||]νώ[-||]σε[-||]σθαι.
 
 Sorry, but I think that the bug is clear, but I don’t know how to
 provide a minimal sample.
 
 Many thanks for your help,

Why is it difficult to provide a minimal example? I have this:

\definepapersize [test] [width=5.7in,height=4in]

\setuppapersize [test] [test]

\mainlanguage [agr]

\definefontfamily [test] [serif] [Free Serif]

\setupbodyfont [test,12pt]

\starttext

\strut \hskip1em Ἀπόλλωνα ἰητρὸν καὶ Ἀσκληπιὸν, καὶ Ὑγείαν καὶ Πανάκειαν
καὶ θεοὺς πάντας τε καὶ πάσας, ἵστορας ποιεύμενος, ἐπιτελέα ποιήσειν κατὰ
δύναμιν καὶ κρίσιν ἐμὴν ὅρκον τόνδε καὶ συγγραφὴν τήνδε· ἡγήσεσθαι μὲν τὸν
διδάξαντά με τὴν τέχνην ταύτην ἴσα γενέτῃσιν ἐμοῖσι, καὶ βίου κοινώσεσθαι

\stoptext

Which gives me the attached output - with the expected hyphenation. So this is 
not a bug, but something is wrong in your document. And we won’t be able to say 
what unless you provide a minimal example.

Thomas



test.pdf
Description: Adobe PDF document
___
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
___

Re: [NTG-context] bug in hyphenation?

2014-09-16 Thread Thangalin
Hi Pablo,

Are you able to avoid \hsize in favour of something like start/stopnarrower?

\setuppapersize[A8]
\starttext
\startnarrower[-left]
\startlinenumbering
sentence
sentence
sentence
\stoplinenumbering
\stopnarrower

\startnarrower[-left]
sentence
sentence
sentence
\stopnarrower
\stoptext

Also, note that the first \hsize\zeropoint has no visible effect:

\setuppapersize[A8]
\starttext
\startlinenumbering
%\hsize\zeropoint
...
\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
___


Re: [NTG-context] bug in hyphenation?

2014-09-04 Thread Pablo Rodriguez
On 08/30/2014 12:00 PM, Hans Hagen wrote:
 On 8/30/2014 6:47 AM, Pablo Rodriguez wrote:
 Dear list,

 the following sample shows bad hyphenation in the first body line and in
 many linenotes:

 \showframe
 \definepapersize[HippPaper][width=6in, height=9in]
 \setuppapersize[HippPaper]
 \setupnote[linenote][rule=off, paragraph=yes, split=verystrict,
 scope=text, inbetween=\hskip1.5em, compress=yes]
 \setupnotation[linenote][numbercommand=, width=broad,
 alternative=serried, distance=1em]

 \starttext
 \startlinenumbering
 \showhyphens{testing paragraph}
 \dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one}
 testing\linenote{nesting} sentence\linenote{table}. }
 \stoplinenumbering
 \stoptext

 If this is not a bug, what am I missing here?

 Many thanks for your help,
 
 more a side effect of binding a reference node and such ... possible 
 solution in next beta

Hans,

I’m afraid that beta from today has still this bug.


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


Re: [NTG-context] bug in hyphenation?

2014-08-30 Thread Hans Hagen

On 8/30/2014 6:47 AM, Pablo Rodriguez wrote:

Dear list,

the following sample shows bad hyphenation in the first body line and in
many linenotes:

\showframe
\definepapersize[HippPaper][width=6in, height=9in]
\setuppapersize[HippPaper]
\setupnote[linenote][rule=off, paragraph=yes, split=verystrict,
scope=text, inbetween=\hskip1.5em, compress=yes]
\setupnotation[linenote][numbercommand=, width=broad,
alternative=serried, distance=1em]

\starttext
\startlinenumbering
\showhyphens{testing paragraph}
\dorecurse{50}{This\linenote{That} is\linenote{was} a\linenote{one}
testing\linenote{nesting} sentence\linenote{table}. }
\stoplinenumbering
\stoptext

If this is not a bug, what am I missing here?

Many thanks for your help,


more a side effect of binding a reference node and such ... possible 
solution in next beta


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


Re: [NTG-context] bug in hyphenation?

2014-08-30 Thread Pablo Rodriguez
On 08/30/2014 12:00 PM, Hans Hagen wrote:
 On 8/30/2014 6:47 AM, Pablo Rodriguez wrote:
 Dear list,

 the following sample shows bad hyphenation in the first body line and in
 many linenotes:
 [...]
 If this is not a bug, what am I missing here?
 
 more a side effect of binding a reference node and such ... possible 
 solution in next beta

Many thanks for your help, Hans.


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