ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* MkIV italic correction?
@ 2009-05-20  6:25 Corsair
  2009-05-20  7:21 ` Yue Wang
  2009-05-21  9:55 ` Hans Hagen
  0 siblings, 2 replies; 29+ messages in thread
From: Corsair @ 2009-05-20  6:25 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 324 bytes --]

Hi all,

Does MkIV support italic correction?  Because the following code
produces two identical "f)"s

\starttext
{\it f})
{\it f\/})
\stoptext

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MkIV italic correction?
  2009-05-20  6:25 MkIV italic correction? Corsair
@ 2009-05-20  7:21 ` Yue Wang
  2009-05-20  7:37   ` Corsair
  2009-05-21  9:55 ` Hans Hagen
  1 sibling, 1 reply; 29+ messages in thread
From: Yue Wang @ 2009-05-20  7:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

it supports italic correction by default.

On Wed, May 20, 2009 at 2:25 PM, Corsair <chris.corsair@gmail.com> wrote:
> Hi all,
>
> Does MkIV support italic correction?  Because the following code
> produces two identical "f)"s
>
> \starttext
> {\it f})
> {\it f\/})
> \stoptext
>
> --
> There is no emotion; there is peace.
> There is no ignorance; there is knowledge.
> There is no passion; there is serenity.
> There is no death; there is the Force.
>
> ___________________________________________________________________________________
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
>
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-20  7:21 ` Yue Wang
@ 2009-05-20  7:37   ` Corsair
  0 siblings, 0 replies; 29+ messages in thread
From: Corsair @ 2009-05-20  7:37 UTC (permalink / raw)
  To: ntg-context


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: Type: text/plain; charset=utf-8, Size: 620 bytes --]

On Wed, May 20, 2009 at 03:21:59PM +0800, Yue Wang wrote:
> it supports italic correction by default.

Then what's your result of the code?  Does it come with italic
correction?

> On Wed, May 20, 2009 at 2:25 PM, Corsair <chris.corsair@gmail.com> wrote:
> > Hi all,
> >
> > Does MkIV support italic correction?  Because the following code
> > produces two identical "f)"s
> >
> > \starttext
> > {\it f})
> > {\it f\/})
> > \stoptext

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MkIV italic correction?
  2009-05-20  6:25 MkIV italic correction? Corsair
  2009-05-20  7:21 ` Yue Wang
@ 2009-05-21  9:55 ` Hans Hagen
  2009-05-21 11:55   ` Corsair
  2009-05-21 13:20   ` Khaled Hosny
  1 sibling, 2 replies; 29+ messages in thread
From: Hans Hagen @ 2009-05-21  9:55 UTC (permalink / raw)
  To: ntg-context

Corsair wrote:
> Hi all,
> 
> Does MkIV support italic correction?  Because the following code
> produces two identical "f)"s
> 
> \starttext
> {\it f})
> {\it f\/})
> \stoptext

open type fonts have no italic correction info (except in math)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-21  9:55 ` Hans Hagen
@ 2009-05-21 11:55   ` Corsair
  2009-05-21 11:59     ` Taco Hoekwater
  2009-05-21 13:20   ` Khaled Hosny
  1 sibling, 1 reply; 29+ messages in thread
From: Corsair @ 2009-05-21 11:55 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 391 bytes --]

On Thu, May 21, 2009 at 11:55:45AM +0200, Hans Hagen wrote:
> open type fonts have no italic correction info (except in math)

But I notice that using the same fonts in XeTeX produces italic
correction.  Is it fake?

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MkIV italic correction?
  2009-05-21 11:55   ` Corsair
@ 2009-05-21 11:59     ` Taco Hoekwater
  2009-05-21 13:36       ` Corsair
  0 siblings, 1 reply; 29+ messages in thread
From: Taco Hoekwater @ 2009-05-21 11:59 UTC (permalink / raw)
  To: ntg-context

Corsair wrote:
> On Thu, May 21, 2009 at 11:55:45AM +0200, Hans Hagen wrote:
>> open type fonts have no italic correction info (except in math)
> 
> But I notice that using the same fonts in XeTeX produces italic
> correction.  Is it fake?

I guess it is using the glyph boundingbox.
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-21  9:55 ` Hans Hagen
  2009-05-21 11:55   ` Corsair
@ 2009-05-21 13:20   ` Khaled Hosny
  2009-05-22  9:25     ` Taco Hoekwater
  1 sibling, 1 reply; 29+ messages in thread
From: Khaled Hosny @ 2009-05-21 13:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 698 bytes --]

On Thu, May 21, 2009 at 11:55:45AM +0200, Hans Hagen wrote:
> Corsair wrote:
>> Hi all,
>>
>> Does MkIV support italic correction?  Because the following code
>> produces two identical "f)"s
>>
>> \starttext
>> {\it f})
>> {\it f\/})
>> \stoptext
>
> open type fonts have no italic correction info (except in math)

Not very helpful in this situation, but FontForge has a non-standard
italic correction (ITLC) table[1], may be TeX related OpenTyp font
projects like Latin Modern and Gyre fonts can use it?

[1]http://fontforge.sourceforge.net/non-standard.html

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MkIV italic correction?
  2009-05-21 11:59     ` Taco Hoekwater
@ 2009-05-21 13:36       ` Corsair
  2009-05-22  9:15         ` Taco Hoekwater
  0 siblings, 1 reply; 29+ messages in thread
From: Corsair @ 2009-05-21 13:36 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 695 bytes --]

On Thu, May 21, 2009 at 01:59:14PM +0200, Taco Hoekwater wrote:
> Corsair wrote:
> > On Thu, May 21, 2009 at 11:55:45AM +0200, Hans Hagen wrote:
> >> open type fonts have no italic correction info (except in math)
> > 
> > But I notice that using the same fonts in XeTeX produces italic
> > correction.  Is it fake?
> 
> I guess it is using the glyph boundingbox.

Thank you.  This sounds reasonable.  Is there any way I can achieve
this in MkIV?  I'm currently using \def\/{\kern0.1em}, which is kinda
dirty...

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MkIV italic correction?
  2009-05-21 13:36       ` Corsair
@ 2009-05-22  9:15         ` Taco Hoekwater
  0 siblings, 0 replies; 29+ messages in thread
From: Taco Hoekwater @ 2009-05-22  9:15 UTC (permalink / raw)
  To: ntg-context



Corsair wrote:
> On Thu, May 21, 2009 at 01:59:14PM +0200, Taco Hoekwater wrote:
>> Corsair wrote:
>>> On Thu, May 21, 2009 at 11:55:45AM +0200, Hans Hagen wrote:
>>>> open type fonts have no italic correction info (except in math)
>>> But I notice that using the same fonts in XeTeX produces italic
>>> correction.  Is it fake?
>> I guess it is using the glyph boundingbox.
> 
> Thank you.  This sounds reasonable.  Is there any way I can achieve
> this in MkIV?  I'm currently using \def\/{\kern0.1em}, which is kinda
> dirty...

Hans could implement something like this easily, but whether it does
much good is doubtful (that square box does not actually tell you where
something sticks out, just that it does).

Best wishes,
Taco


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


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

* Re: MkIV italic correction?
  2009-05-21 13:20   ` Khaled Hosny
@ 2009-05-22  9:25     ` Taco Hoekwater
  2009-05-22 10:48       ` Hans Hagen
  0 siblings, 1 reply; 29+ messages in thread
From: Taco Hoekwater @ 2009-05-22  9:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Khaled Hosny wrote:
> 
> Not very helpful in this situation, but FontForge has a non-standard
> italic correction (ITLC) table[1], may be TeX related OpenTyp font
> projects like Latin Modern and Gyre fonts can use it?

That would perhaps not be a bad idea. If that table is there then
luatex will automatically use it (it is a subtable of 'TeX ', which
also contains height and depth information, and font dimensions).


Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-22  9:25     ` Taco Hoekwater
@ 2009-05-22 10:48       ` Hans Hagen
  2009-05-22 11:23         ` Taco Hoekwater
  0 siblings, 1 reply; 29+ messages in thread
From: Hans Hagen @ 2009-05-22 10:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Taco Hoekwater wrote:
> 
> Khaled Hosny wrote:
>> Not very helpful in this situation, but FontForge has a non-standard
>> italic correction (ITLC) table[1], may be TeX related OpenTyp font
>> projects like Latin Modern and Gyre fonts can use it?
> 
> That would perhaps not be a bad idea. If that table is there then
> luatex will automatically use it (it is a subtable of 'TeX ', which
> also contains height and depth information, and font dimensions).

so, that data would end up in a regular feature/lookup? of is it an 
entry in the glyph?

for taco: it would be handy then to have a flag telling so, otherwise we 
would have to check for each glyph a field which for huge fonts is a 
slow downer


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-22 10:48       ` Hans Hagen
@ 2009-05-22 11:23         ` Taco Hoekwater
  2009-05-22 12:44           ` French typography is back Robert-André Mauchin
  2009-05-27  4:34           ` MkIV italic correction? Dohyun Kim
  0 siblings, 2 replies; 29+ messages in thread
From: Taco Hoekwater @ 2009-05-22 11:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Hans Hagen wrote:
> Taco Hoekwater wrote:
>>
>> Khaled Hosny wrote:
>>> Not very helpful in this situation, but FontForge has a non-standard
>>> italic correction (ITLC) table[1], may be TeX related OpenTyp font
>>> projects like Latin Modern and Gyre fonts can use it?
>>
>> That would perhaps not be a bad idea. If that table is there then
>> luatex will automatically use it (it is a subtable of 'TeX ', which
>> also contains height and depth information, and font dimensions).
> 
> so, that data would end up in a regular feature/lookup? of is it an
> entry in the glyph?

They are automatically merged into the glyph, as

	glyph.italic_correction
	glyph.tex_height
	glyph.tex_depth

Best wishes,
Taco
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: French typography is back
  2009-05-22 11:23         ` Taco Hoekwater
@ 2009-05-22 12:44           ` Robert-André Mauchin
  2009-05-22 15:51             ` Arthur Reutenauer
  2009-05-27  4:34           ` MkIV italic correction? Dohyun Kim
  1 sibling, 1 reply; 29+ messages in thread
From: Robert-André Mauchin @ 2009-05-22 12:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

 > Hans Hagen a écrit :
 > > Robert-André Mauchin wrote:
 > >
 > > The best would be to get rid off
 > > \setcharacterspacing[frenchpunctuation] and adapt the frenchb Babel
 > > module from Daniel Flipo (source and explanation here
 > > http://daniel.flipo.free.fr/frenchb/ ), as a module (t-french
 > > modification), or when loading the language, but I really
 > > don't know how hard it would be since it handles a lot more than
 > > just punctuation marks.
 >
 > no, active chars for such things are no solution and will not be
 > supported in mkiv; setcharacterspacing is the way to go (and if it
 > breaks that should be fixed instead); language support shoul dbe
 > in the kernel anyway
 >
 > Hans


I don't specifically talk about active chars (I don't really not what 
this is, I'm an user, not a coder), but instead of arbitrary adding a 
0.25em before and 1em after the punctuation mark you should use the real 
nnbsp (U+202F) before and real normal space (U+0020) after.

Why? Let me take your example again:

{\setcharacterspacing[frenchpunctuation]a? aa? aaa? abba?}

a\,? aa\,? aaa\,? abba\,?

Surprise: the first line is longer than the second. It's because sizes 
of the U+0020 and U+202F depend on the font design, their size are not 
exactly 1em and 0.25em.

Moreover, this is true that in french typography we should use a thin 
space before some punctuation mark, and a thin space in France *was* one 
fourth of an em. BUT due to modern digital typography, a thin space now 
correspond to something like one fifth of an em.
In digital typography, the normal space, i.e. inter-word separation, 
i.e. "espace justifiante" in French, has generally a size around one 
fourth of an em, calculated by the engine (you know that better than 
me). The thin space is a bit more than a half of the inter-word 
separation, i.e. between 1/8 and 1/6 of an em.

So I *really* believe that you should not define space before and after 
punctuation with "arbitrary" em spacing. There must be a way to do a 
"search and replace" with the correct glyphs (U+202F and U+0020) before 
and after punctuation marks.

 > language support should be in the kernel anyway

I agree of course, but although I believe this would encourage french 
"texers" to use Context, I don't think typography for a specific 
language is the priority for you&Taco right now.

I wish you luck for the next beta release!

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


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

* Re: French typography is back
  2009-05-22 12:44           ` French typography is back Robert-André Mauchin
@ 2009-05-22 15:51             ` Arthur Reutenauer
  2009-05-22 16:38               ` Robert-André Mauchin
  2009-05-22 16:40               ` luigi scarso
  0 siblings, 2 replies; 29+ messages in thread
From: Arthur Reutenauer @ 2009-05-22 15:51 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

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

>                                but instead of arbitrary adding a 0.25em 
> before and 1em after the punctuation mark you should use the real nnbsp 
> (U+202F) before and real normal space (U+0020) after.

  I don't think so.  Space characters don't mix very well with TeX glue
and should best be avoided, generally speaking.  In particular, all
inter-word spaces that are input in the TeX source as one or more of
U+0020 are simply ignored, and replaced by normal inter-word glue, with
its appropriate stretchability and shrinkability.  This has always been
the case in TeX and is not going to change.  All other types of Unicode
spaces should really, in my opinion, be processed in the same way, while
respecting their additional properties in the case of non-breakable
spaces, for instance.

  In addition, characters like U+202F are very badly supported across
fonts, and if you take in account the fact that the most appropriate
width will probably change depending on the language, you're likely to
observe much more arbitrary results if you use the glyph for that
character in font.  I seriously doubt you want to rely on the font for
that.

> Why? Let me take your example again:
>
> {\setcharacterspacing[frenchpunctuation]a? aa? aaa? abba?}
>
> a\,? aa\,? aaa\,? abba\,?
>
> Surprise: the first line is longer than the second. It's because sizes of 
> the U+0020 and U+202F depend on the font design, their size are not exactly 
> 1em and 0.25em.

  That's not the reason.  The reason is simply that \, is defined as a
\kern by one sixth of an em (see core-spa.mkiv: it's equivalent to
\thinspace, which is \kern .16667em).  In the first line, the value of
.25em is defined in core-spa.mkiv; you can redefine it if you want.
In any case, every space is completely controlled by ConTeXt, we don't
let the font mess around.

  For that matter, Latin Modern doesn't have a glyph for U+202F, so if
we'd use it, we'd just see nothing: there would be no space at all, see
attached file.

> Moreover, this is true that in french typography we should use a thin space 
> before some punctuation mark, and a thin space in France *was* one fourth 
> of an em. BUT due to modern digital typography, a thin space now correspond 
> to something like one fifth of an em.
> In digital typography, the normal space, i.e. inter-word separation, i.e. 
> "espace justifiante" in French, has generally a size around one fourth of 
> an em, calculated by the engine (you know that better than me). The thin 
> space is a bit more than a half of the inter-word separation, i.e. between 
> 1/8 and 1/6 of an em.

  All this really calls for more coordination in order to produce decent
specifications, in my opinion.  If you think ConTeXt's default should be
different, it's fine and I encourage you to contact Sébastien to discuss
about it.  Report then to Hans and Peter for the implementation.

> So I *really* believe that you should not define space before and after 
> punctuation with "arbitrary" em spacing. There must be a way to do a 
> "search and replace" with the correct glyphs (U+202F and U+0020) before and 
> after punctuation marks.

  As my example file demonstrates, we clearly shouldn't use the glyphs
from the font.

	Arthur

[-- Attachment #2: frenchpunctuation.pdf --]
[-- Type: application/pdf, Size: 15357 bytes --]

[-- Attachment #3: frenchpunctuation.tex --]
[-- Type: application/x-tex, Size: 852 bytes --]

[-- Attachment #4: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: French typography is back
  2009-05-22 15:51             ` Arthur Reutenauer
@ 2009-05-22 16:38               ` Robert-André Mauchin
  2009-05-22 22:58                 ` Arthur Reutenauer
  2009-05-22 16:40               ` luigi scarso
  1 sibling, 1 reply; 29+ messages in thread
From: Robert-André Mauchin @ 2009-05-22 16:38 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

Le 22/05/2009 17:51, Arthur Reutenauer a écrit :
>>                                 but instead of arbitrary adding a 0.25em
>> before and 1em after the punctuation mark you should use the real nnbsp
>> (U+202F) before and real normal space (U+0020) after.
>
>    I don't think so.  Space characters don't mix very well with TeX glue
> and should best be avoided, generally speaking.  In particular, all
> inter-word spaces that are input in the TeX source as one or more of
> U+0020 are simply ignored, and replaced by normal inter-word glue, with
> its appropriate stretchability and shrinkability.  This has always been
> the case in TeX and is not going to change.  All other types of Unicode
> spaces should really, in my opinion, be processed in the same way, while
> respecting their additional properties in the case of non-breakable
> spaces, for instance.
>

Not knowing the internals, that's what I tried to say with adding a 
space after instead of 1em, i.e. "calculated by the engine". If w an em 
is added after, it is not stretchable and shrinkable, right?

>    In addition, characters like U+202F are very badly supported across
> fonts, and if you take in account the fact that the most appropriate
> width will probably change depending on the language, you're likely to
> observe much more arbitrary results if you use the glyph for that
> character in font.  I seriously doubt you want to rely on the font for
> that.
>
>> Why? Let me take your example again:
>>
>> {\setcharacterspacing[frenchpunctuation]a? aa? aaa? abba?}
>>
>> a\,? aa\,? aaa\,? abba\,?
>>
>> Surprise: the first line is longer than the second. It's because sizes of
>> the U+0020 and U+202F depend on the font design, their size are not exactly
>> 1em and 0.25em.
>
>    That's not the reason.  The reason is simply that \, is defined as a
> \kern by one sixth of an em (see core-spa.mkiv: it's equivalent to
> \thinspace, which is \kern .16667em).  In the first line, the value of
> .25em is defined in core-spa.mkiv; you can redefine it if you want.
> In any case, every space is completely controlled by ConTeXt, we don't
> let the font mess around.
>
>    For that matter, Latin Modern doesn't have a glyph for U+202F, so if
> we'd use it, we'd just see nothing: there would be no space at all, see
> attached file.
>

Thank you so much for the detailed technical explanation! So, AFAIK, I 
believe that the space before should be equivalent to thinspace.


>    All this really calls for more coordination in order to produce decent
> specifications, in my opinion.  If you think ConTeXt's default should be
> different, it's fine and I encourage you to contact Sébastien to discuss
> about it.  Report then to Hans and Peter for the implementation.
>

Thanks, I'll see that. Maybe I could write some detailled specs in the wiki.


Regards,

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


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

* Re: French typography is back
  2009-05-22 15:51             ` Arthur Reutenauer
  2009-05-22 16:38               ` Robert-André Mauchin
@ 2009-05-22 16:40               ` luigi scarso
  2009-05-22 17:06                 ` Hans Hagen
  1 sibling, 1 reply; 29+ messages in thread
From: luigi scarso @ 2009-05-22 16:40 UTC (permalink / raw)
  To: Mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1080 bytes --]

On Fri, May 22, 2009 at 5:51 PM, Arthur Reutenauer <
arthur.reutenauer@normalesup.org> wrote:

> >                                but instead of arbitrary adding a 0.25em
> > before and 1em after the punctuation mark you should use the real nnbsp
> > (U+202F) before and real normal space (U+0020) after.
>
>   I don't think so.  Space characters don't mix very well with TeX glue
> and should best be avoided, generally speaking.  In particular, all
> inter-word spaces that are input in the TeX source as one or more of
> U+0020 are simply ignored, and replaced by normal inter-word glue, with
> its appropriate stretchability and shrinkability.  This has always been
> the case in TeX and is not going to change.  All other types of Unicode
> spaces should really, in my opinion, be processed in the same way, while
> respecting their additional properties in the case of non-breakable
> spaces, for instance.
>

Maybe one can use
something like this
\defineremapper[filterItem]
\remapcharacter[filterItem][`•]{\item}

for "spaces"  too

-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1493 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: French typography is back
  2009-05-22 16:40               ` luigi scarso
@ 2009-05-22 17:06                 ` Hans Hagen
  0 siblings, 0 replies; 29+ messages in thread
From: Hans Hagen @ 2009-05-22 17:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

luigi scarso wrote:
> On Fri, May 22, 2009 at 5:51 PM, Arthur Reutenauer <
> arthur.reutenauer@normalesup.org> wrote:
> 
>>>                                but instead of arbitrary adding a 0.25em
>>> before and 1em after the punctuation mark you should use the real nnbsp
>>> (U+202F) before and real normal space (U+0020) after.
>>   I don't think so.  Space characters don't mix very well with TeX glue
>> and should best be avoided, generally speaking.  In particular, all
>> inter-word spaces that are input in the TeX source as one or more of
>> U+0020 are simply ignored, and replaced by normal inter-word glue, with
>> its appropriate stretchability and shrinkability.  This has always been
>> the case in TeX and is not going to change.  All other types of Unicode
>> spaces should really, in my opinion, be processed in the same way, while
>> respecting their additional properties in the case of non-breakable
>> spaces, for instance.
>>
> 
> Maybe one can use
> something like this
> \defineremapper[filterItem]
> \remapcharacter[filterItem][`•]{\item}
> 
> for "spaces"  too

as such a remapper is applied on all input eventually you end up in a 
mess and we don't want a mess ... the current mechanism acts upon the to 
be typeset text which is way more safe



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: French typography is back
  2009-05-22 16:38               ` Robert-André Mauchin
@ 2009-05-22 22:58                 ` Arthur Reutenauer
  0 siblings, 0 replies; 29+ messages in thread
From: Arthur Reutenauer @ 2009-05-22 22:58 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

> Not knowing the internals, that's what I tried to say with adding a space 
> after instead of 1em, i.e. "calculated by the engine". If w an em is added 
> after, it is not stretchable and shrinkable, right?

  Right.  But no particular space is added after '?' or '!' in French
punctuation mode, TeX sets the standard inter-word glue, as it should.
The only intervention by ConTeXt is the addition of the unbreakable
space before those marks (and, obviously, after '«').

> Thank you so much for the detailed technical explanation! So, AFAIK, I 
> believe that the space before should be equivalent to thinspace.

  You'd need to take this up with Olivier Guéry, who suggested the 1/4
em value in the first place (refer to his interventions from last Fall,
e.g., http://www.ntg.nl/pipermail/ntg-context/2008/034845.html).  He
wrote up a small proposal on the wiki page for French Punctuation
(http://wiki.contextgarden.net/French_Punctuation).

> Thanks, I'll see that. Maybe I could write some detailled specs in the wiki.

  Yes, please do so by extending the aforementioned page if needed.

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


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

* Re: MkIV italic correction?
  2009-05-22 11:23         ` Taco Hoekwater
  2009-05-22 12:44           ` French typography is back Robert-André Mauchin
@ 2009-05-27  4:34           ` Dohyun Kim
  2009-05-27  8:11             ` Hans Hagen
  2009-06-01 15:15             ` Khaled Hosny
  1 sibling, 2 replies; 29+ messages in thread
From: Dohyun Kim @ 2009-05-27  4:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users

2009/5/22 Taco Hoekwater <taco@elvenkind.com>:
>
>
> Hans Hagen wrote:
>> Taco Hoekwater wrote:
>>>
>>> Khaled Hosny wrote:
>>>> Not very helpful in this situation, but FontForge has a non-standard
>>>> italic correction (ITLC) table[1], may be TeX related OpenTyp font
>>>> projects like Latin Modern and Gyre fonts can use it?
>>>
>>> That would perhaps not be a bad idea. If that table is there then
>>> luatex will automatically use it (it is a subtable of 'TeX ', which
>>> also contains height and depth information, and font dimensions).
>>
>> so, that data would end up in a regular feature/lookup? of is it an
>> entry in the glyph?
>
> They are automatically merged into the glyph, as
>
>        glyph.italic_correction
>        glyph.tex_height
>        glyph.tex_depth
>

Hi,

Considering current state that we don't know any fonts that has ITLC table,
it would be better than nothing to implement italic correction as follows.
In the following code, "fontdata" is a table returned by the function
"fonts.define.read".

        local param = fontdata.parameters
        local italicangle = fontdata.shared.otfdata.metadata.italicangle
        if italicangle and italicangle < 0 then
            local uwidth = fontdata.shared.otfdata.metadata.uwidth or 40
            local factor = fontdata.factor or 655.36
            param.slant = - math.tan(italicangle*math.pi/180) * param.quad
            for i,v in pairs(fontdata.characters) do
                local gl = fontdata.descriptions[i]
                local it = (gl.boundingbox[3] - gl.width + uwidth*0.5) * factor
                if it > 0 then v.italic = it end
            end
        end

Best,
Dohyun Kim
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-27  4:34           ` MkIV italic correction? Dohyun Kim
@ 2009-05-27  8:11             ` Hans Hagen
  2009-06-01 15:15             ` Khaled Hosny
  1 sibling, 0 replies; 29+ messages in thread
From: Hans Hagen @ 2009-05-27  8:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dohyun Kim wrote:

> Considering current state that we don't know any fonts that has ITLC table,
> it would be better than nothing to implement italic correction as follows.
> In the following code, "fontdata" is a table returned by the function
> "fonts.define.read".
> 
>         local param = fontdata.parameters
>         local italicangle = fontdata.shared.otfdata.metadata.italicangle
>         if italicangle and italicangle < 0 then
>             local uwidth = fontdata.shared.otfdata.metadata.uwidth or 40
>             local factor = fontdata.factor or 655.36
>             param.slant = - math.tan(italicangle*math.pi/180) * param.quad
>             for i,v in pairs(fontdata.characters) do
>                 local gl = fontdata.descriptions[i]
>                 local it = (gl.boundingbox[3] - gl.width + uwidth*0.5) * factor
>                 if it > 0 then v.italic = it end
>             end
>         end

there are seleveral solutions:

- extend the font with this info (faster but then it's always there 
which might not be ok as it's an approximation)

- calculate it after loading (which is what you propose)

in the mkiv code we do have a hook for that kind of things so this is 
then what i propose. watch how we don't scale here, we just add an entry 
to the shared data as that's where we hook in; the real implementation 
would look slightly different as an optimization is possible

\starttext

\startluacode
table.insert(fonts.triggers,"itlc")

local function itlc(tfmdata,value)
     if value then
         -- the magic 40 and it formula come from Dohyun Kim
         local fontdata = tfmdata.shared.otfdata or tfmdata.shared.afmdata
         local metadata = fontdata and fontdata.metadata
         if metadata then
             local italicangle = metadata.italicangle
             if italicangle and italicangle ~= 0 then
                 local uwidth = (metadata.uwidth or 40)/2
                 for unicode, d in next, tfmdata.descriptions do
                     local it = d.boundingbox[3] - d.width + uwidth
                     if it ~= 0 then
                         d.italic = it
                     end
                 end
             end
         end
     end
end

fonts.initializers.base.otf.itlc = itlc
fonts.initializers.node.otf.itlc = itlc

fonts.initializers.base.afm.itlc = itlc
fonts.initializers.node.afm.itlc = itlc
\stopluacode

\definedfont[SerifItalic*default at 24pt] test\/test

\definefontfeature[xdefault][default][itlc=yes]

\definedfont[SerifItalic*xdefault at 24pt] test\/test

\stoptext

i could add it to the generic code (although i'm not going to add all 
the other context goodies to the generic code definitely not as long as 
they're experimental)



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: MkIV italic correction?
  2009-05-27  4:34           ` MkIV italic correction? Dohyun Kim
  2009-05-27  8:11             ` Hans Hagen
@ 2009-06-01 15:15             ` Khaled Hosny
  2009-06-01 20:19               ` Hans Hagen
  1 sibling, 1 reply; 29+ messages in thread
From: Khaled Hosny @ 2009-06-01 15:15 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1647 bytes --]

On Wed, May 27, 2009 at 01:34:57PM +0900, Dohyun Kim wrote:
> 2009/5/22 Taco Hoekwater <taco@elvenkind.com>:
> >
> >
> > Hans Hagen wrote:
> >> Taco Hoekwater wrote:
> >>>
> >>> Khaled Hosny wrote:
> >>>> Not very helpful in this situation, but FontForge has a non-standard
> >>>> italic correction (ITLC) table[1], may be TeX related OpenTyp font
> >>>> projects like Latin Modern and Gyre fonts can use it?
> >>>
> >>> That would perhaps not be a bad idea. If that table is there then
> >>> luatex will automatically use it (it is a subtable of 'TeX ', which
> >>> also contains height and depth information, and font dimensions).
> >>
> >> so, that data would end up in a regular feature/lookup? of is it an
> >> entry in the glyph?
> >
> > They are automatically merged into the glyph, as
> >
> >        glyph.italic_correction
> >        glyph.tex_height
> >        glyph.tex_depth
> >
> 
> Hi,
> 
> Considering current state that we don't know any fonts that has ITLC table,
> it would be better than nothing to implement italic correction as follows.

Per FontForge's documentation, it can generate italic correction values,
may be LuaTeX could make use of such feature and provide a way to
generate italic correction values for fonts missing it, may be the tex
height and depth too, if it isn't doing so already? Since FontForge has
access to actual glyph shapes, it might be generating better guesses.

I can generate sample fonts with FontForge for testing, if needed.

Regards,
 Khaled


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: MkIV italic correction?
  2009-06-01 15:15             ` Khaled Hosny
@ 2009-06-01 20:19               ` Hans Hagen
  0 siblings, 0 replies; 29+ messages in thread
From: Hans Hagen @ 2009-06-01 20:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> On Wed, May 27, 2009 at 01:34:57PM +0900, Dohyun Kim wrote:
>> 2009/5/22 Taco Hoekwater <taco@elvenkind.com>:
>>>
>>> Hans Hagen wrote:
>>>> Taco Hoekwater wrote:
>>>>> Khaled Hosny wrote:
>>>>>> Not very helpful in this situation, but FontForge has a non-standard
>>>>>> italic correction (ITLC) table[1], may be TeX related OpenTyp font
>>>>>> projects like Latin Modern and Gyre fonts can use it?
>>>>> That would perhaps not be a bad idea. If that table is there then
>>>>> luatex will automatically use it (it is a subtable of 'TeX ', which
>>>>> also contains height and depth information, and font dimensions).
>>>> so, that data would end up in a regular feature/lookup? of is it an
>>>> entry in the glyph?
>>> They are automatically merged into the glyph, as
>>>
>>>        glyph.italic_correction
>>>        glyph.tex_height
>>>        glyph.tex_depth
>>>
>> Hi,
>>
>> Considering current state that we don't know any fonts that has ITLC table,
>> it would be better than nothing to implement italic correction as follows.
> 
> Per FontForge's documentation, it can generate italic correction values,
> may be LuaTeX could make use of such feature and provide a way to
> generate italic correction values for fonts missing it, may be the tex
> height and depth too, if it isn't doing so already? Since FontForge has
> access to actual glyph shapes, it might be generating better guesses.
> 
> I can generate sample fonts with FontForge for testing, if needed.

as such an italic correction is not part of the font design but a guess 
it makes sense to keep it 'under lua control' so i implemented a 
itls=yes feature (base mode and node mode; is in beta)

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: French typography is back
       [not found] <mailman.0.1242930320.17979.ntg-context@ntg.nl>
@ 2009-05-21 18:32 ` Robert-André Mauchin
  0 siblings, 0 replies; 29+ messages in thread
From: Robert-André Mauchin @ 2009-05-21 18:32 UTC (permalink / raw)
  To: ntg-context

Le 21/05/2009 18:29, Hans Hagen a écrit :
 > \setcharacterspacing[frenchpunctuation]
 >
 > \hsize .1mm a? aa? aaa? aaaa?
 >
 > seems ok here so what version are you using?
 >

Ok, I've made test, I stand corrected, it does add a nnbsp, but does not 
remove the space (if there is) before the punctuation mark. That's why I 
end up with a "?" at the beginning of a new line.

Thanks for the tip.

Bob.

ps: sorry for the bad "reply", but my subscription request has not been 
approved yet.
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: French typography is back
  2009-05-21 16:29 ` Hans Hagen
@ 2009-05-21 17:33   ` Wolfgang Schuster
  0 siblings, 0 replies; 29+ messages in thread
From: Wolfgang Schuster @ 2009-05-21 17:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 21.05.2009 um 18:29 schrieb Hans Hagen:

> Robert-André Mauchin wrote:
>> Hi again,
>> I have been reading all threads about the French typography in this  
>> mailing list, however the current solution is alas far for perfect.  
>> The command \setcharacterspacing[frenchpunctuation] was a good  
>> idea, but it only deals with spacing. French typography rules not  
>> only tells us that there should be a narrow, or a normal space  
>> before some punctuation marks like :, ;, , !, ?, « or », but also  
>> that theses spaces must be non breakable otherwise line breaking  
>> could occur just before a punctuation mark (and this is very bad).
>> Take a look at the following example:
>> \section{Production locale indigène ou production romaine importée?}
>
> \setcharacterspacing[frenchpunctuation]
>
> \hsize .1mm a? aa? aaa? aaaa?
>
> seems ok here so what version are you using?

Not tested but shouldn't be the following two lines (type-spa.lua ->  
line 131/132) be written in the reverse order (penalty before skip).

  	insert_node_after(head,start,make_glue_node(tex.scale(quad,right)))
	insert_node_after(head,start,make_penalty_node(10000))

Wolfgang

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


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

* Re: French typography is back
  2009-05-21 12:28 French typography is back Robert-André Mauchin
                   ` (2 preceding siblings ...)
  2009-05-21 16:26 ` Hans Hagen
@ 2009-05-21 16:29 ` Hans Hagen
  2009-05-21 17:33   ` Wolfgang Schuster
  3 siblings, 1 reply; 29+ messages in thread
From: Hans Hagen @ 2009-05-21 16:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Robert-André Mauchin wrote:
> Hi again,
> 
> I have been reading all threads about the French typography in this 
> mailing list, however the current solution is alas far for perfect. The 
> command \setcharacterspacing[frenchpunctuation] was a good idea, but it 
> only deals with spacing. French typography rules not only tells us that 
> there should be a narrow, or a normal space before some punctuation 
> marks like :, ;, , !, ?, « or », but also that theses spaces must be non 
> breakable otherwise line breaking could occur just before a punctuation 
> mark (and this is very bad).
> 
> Take a look at the following example:
> \section{Production locale indigène ou production romaine importée?}

\setcharacterspacing[frenchpunctuation]

\hsize .1mm a? aa? aaa? aaaa?

seems ok here so what version are you using?



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: French typography is back
  2009-05-21 12:28 French typography is back Robert-André Mauchin
  2009-05-21 14:39 ` Peter Münster
  2009-05-21 15:24 ` Arthur Reutenauer
@ 2009-05-21 16:26 ` Hans Hagen
  2009-05-21 16:29 ` Hans Hagen
  3 siblings, 0 replies; 29+ messages in thread
From: Hans Hagen @ 2009-05-21 16:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Robert-André Mauchin wrote:

> The best would be to get rid off \setcharacterspacing[frenchpunctuation] 
> and adapt the frenchb Babel module from Daniel Flipo (source and 
> explanation here http://daniel.flipo.free.fr/frenchb/ ), as a module 
> (t-french modification), or when loading the language, but I really 
> don't know how hard it would be since it handles a lot more than just 
> punctuation marks.

no, active chars for such things are no solution and will not be 
supported in mkiv; setcharacterspacing is the way to go (and if it 
breaks that should be fixed instead); language support shoul dbe in the 
kernel anyway

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: French typography is back
  2009-05-21 12:28 French typography is back Robert-André Mauchin
  2009-05-21 14:39 ` Peter Münster
@ 2009-05-21 15:24 ` Arthur Reutenauer
  2009-05-21 16:26 ` Hans Hagen
  2009-05-21 16:29 ` Hans Hagen
  3 siblings, 0 replies; 29+ messages in thread
From: Arthur Reutenauer @ 2009-05-21 15:24 UTC (permalink / raw)
  To: Mailing list for ConTeXt users

> and adapt the frenchb Babel module from Daniel Flipo (source and 
> explanation here http://daniel.flipo.free.fr/frenchb/ ), as a module 
> (t-french modification)

  Contact Sébastien Mengin (sebastien <at> edilibre.net) about that; he
started working on it.

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


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

* Re: French typography is back
  2009-05-21 12:28 French typography is back Robert-André Mauchin
@ 2009-05-21 14:39 ` Peter Münster
  2009-05-21 15:24 ` Arthur Reutenauer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 29+ messages in thread
From: Peter Münster @ 2009-05-21 14:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, 21 May 2009, Robert-André Mauchin wrote:

> With the current frenchpunctuation command, we got:
> Production locale indigène ou production romaine importée
> ?

Seems to be a bug. Some months ago, this space was unbreakable as it
should.


> The best would be to get rid off \setcharacterspacing[frenchpunctuation] and
> adapt the frenchb Babel module from Daniel Flipo (source and explanation here
> http://daniel.flipo.free.fr/frenchb/ ), as a module (t-french modification),
> or when loading the language, but I really don't know how hard it would be
> since it handles a lot more than just punctuation marks.

A good idea. This is work in progress:
http://modules.contextgarden.net/t-french
You can contribute.

But I think, \setcharacterspacing[frenchpunctuation] should stay. The
module t-french.tex should just integrate this command, that's all.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/

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

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

* French typography is back
@ 2009-05-21 12:28 Robert-André Mauchin
  2009-05-21 14:39 ` Peter Münster
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: Robert-André Mauchin @ 2009-05-21 12:28 UTC (permalink / raw)
  To: ntg-context

Hi again,

I have been reading all threads about the French typography in this 
mailing list, however the current solution is alas far for perfect. The 
command \setcharacterspacing[frenchpunctuation] was a good idea, but it 
only deals with spacing. French typography rules not only tells us that 
there should be a narrow, or a normal space before some punctuation 
marks like :, ;, , !, ?, « or », but also that theses spaces must be non 
breakable otherwise line breaking could occur just before a punctuation 
mark (and this is very bad).

Take a look at the following example:
\section{Production locale indigène ou production romaine importée?}

With the current frenchpunctuation command, we got:
Production locale indigène ou production romaine importée
?

We should obtain:
Production locale indigène ou production romaine
importée ?

Of course we could achieve this manually by adding the correct NNBSP 
like this:
\section{Production locale indigène ou production romaine importée\,?}
But I believe the whole point of TeX is to let the engine make all the 
typographic stuff.

The best would be to get rid off \setcharacterspacing[frenchpunctuation] 
and adapt the frenchb Babel module from Daniel Flipo (source and 
explanation here http://daniel.flipo.free.fr/frenchb/ ), as a module 
(t-french modification), or when loading the language, but I really 
don't know how hard it would be since it handles a lot more than just 
punctuation marks.

Regards,

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


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

end of thread, other threads:[~2009-06-01 20:19 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-20  6:25 MkIV italic correction? Corsair
2009-05-20  7:21 ` Yue Wang
2009-05-20  7:37   ` Corsair
2009-05-21  9:55 ` Hans Hagen
2009-05-21 11:55   ` Corsair
2009-05-21 11:59     ` Taco Hoekwater
2009-05-21 13:36       ` Corsair
2009-05-22  9:15         ` Taco Hoekwater
2009-05-21 13:20   ` Khaled Hosny
2009-05-22  9:25     ` Taco Hoekwater
2009-05-22 10:48       ` Hans Hagen
2009-05-22 11:23         ` Taco Hoekwater
2009-05-22 12:44           ` French typography is back Robert-André Mauchin
2009-05-22 15:51             ` Arthur Reutenauer
2009-05-22 16:38               ` Robert-André Mauchin
2009-05-22 22:58                 ` Arthur Reutenauer
2009-05-22 16:40               ` luigi scarso
2009-05-22 17:06                 ` Hans Hagen
2009-05-27  4:34           ` MkIV italic correction? Dohyun Kim
2009-05-27  8:11             ` Hans Hagen
2009-06-01 15:15             ` Khaled Hosny
2009-06-01 20:19               ` Hans Hagen
2009-05-21 12:28 French typography is back Robert-André Mauchin
2009-05-21 14:39 ` Peter Münster
2009-05-21 15:24 ` Arthur Reutenauer
2009-05-21 16:26 ` Hans Hagen
2009-05-21 16:29 ` Hans Hagen
2009-05-21 17:33   ` Wolfgang Schuster
     [not found] <mailman.0.1242930320.17979.ntg-context@ntg.nl>
2009-05-21 18:32 ` Robert-André Mauchin

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