ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Wrong spacing using stretch effect
@ 2013-09-25 10:32 Marco Patzer
  2013-09-30  8:36 ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Patzer @ 2013-09-25 10:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,

the stretch effect does not take the final width of the string into
account. Is this a bug or a limitation? Example:

\starttext
  (\effect[stretch]{fftabc})\par  %% “c” collides with “)”
  (\kerncharacters[.05]fftabc)    %% no collision
\stoptext

Marco

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

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

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

* Re: Wrong spacing using stretch effect
  2013-09-25 10:32 Wrong spacing using stretch effect Marco Patzer
@ 2013-09-30  8:36 ` Hans Hagen
  2013-10-01  8:05   ` Marco Patzer
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2013-09-30  8:36 UTC (permalink / raw)
  To: ntg-context

On 9/25/2013 12:32 PM, Marco Patzer wrote:
> Hi,
>
> the stretch effect does not take the final width of the string into
> account. Is this a bug or a limitation? Example:
>
> \starttext
>    (\effect[stretch]{fftabc})\par  %% “c” collides with “)”
>    (\kerncharacters[.05]fftabc)    %% no collision
> \stoptext

these are unrelated mechanisms where the first one just does some pdf 
magic ... no feedback to tex about widths (ok, i could write something 
better but never had and still don't have a reason for that kind of low 
level pdf based approach to be really deeply integrated)

a better test is this:

   (\effect[stretch]{\dorecurse{50}{x}})\par  %% “c” collides with “)”


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

* Re: Wrong spacing using stretch effect
  2013-09-30  8:36 ` Hans Hagen
@ 2013-10-01  8:05   ` Marco Patzer
  2013-10-01  9:20     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Patzer @ 2013-10-01  8:05 UTC (permalink / raw)
  To: ntg-context


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

On 2013–09–30 Hans Hagen wrote:

> these are unrelated mechanisms where the first one just does some
> pdf magic ... no feedback to tex about widths (ok, i could write
> something better but never had and still don't have a reason for
> that kind of low level pdf based approach to be really deeply
> integrated)

Thanks for the explanation. I was looking for a way to do slight
letter spacing without breaking ligatures and thought I could
leverage the stretch effect for that.

Marco

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

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

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

* Re: Wrong spacing using stretch effect
  2013-10-01  8:05   ` Marco Patzer
@ 2013-10-01  9:20     ` Hans Hagen
  2013-10-01  9:45       ` Khaled Hosny
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2013-10-01  9:20 UTC (permalink / raw)
  To: ntg-context

On 10/1/2013 10:05 AM, Marco Patzer wrote:
> On 2013–09–30 Hans Hagen wrote:
>
>> these are unrelated mechanisms where the first one just does some
>> pdf magic ... no feedback to tex about widths (ok, i could write
>> something better but never had and still don't have a reason for
>> that kind of low level pdf based approach to be really deeply
>> integrated)
>
> Thanks for the explanation. I was looking for a way to do slight
> letter spacing without breaking ligatures and thought I could
> leverage the stretch effect for that.

well, we break ligatures because ligatures make no sense in that kind of 
kerned text (if they make sense at all, but that's a different issue

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

* Re: Wrong spacing using stretch effect
  2013-10-01  9:20     ` Hans Hagen
@ 2013-10-01  9:45       ` Khaled Hosny
  2013-10-01  9:53         ` Philipp Gesang
  0 siblings, 1 reply; 9+ messages in thread
From: Khaled Hosny @ 2013-10-01  9:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Oct 01, 2013 at 11:20:52AM +0200, Hans Hagen wrote:
> On 10/1/2013 10:05 AM, Marco Patzer wrote:
> >On 2013–09–30 Hans Hagen wrote:
> >
> >>these are unrelated mechanisms where the first one just does some
> >>pdf magic ... no feedback to tex about widths (ok, i could write
> >>something better but never had and still don't have a reason for
> >>that kind of low level pdf based approach to be really deeply
> >>integrated)
> >
> >Thanks for the explanation. I was looking for a way to do slight
> >letter spacing without breaking ligatures and thought I could
> >leverage the stretch effect for that.
> 
> well, we break ligatures because ligatures make no sense in that
> kind of kerned text (if they make sense at all, but that's a
> different issue

Some ligatures should not be broken in letter-spaced text, typically
represented by rlig in OpenType, e.g. Fraktur ch, ck, ſt and tz
ligatures:
http://unifraktur.sourceforge.net/letterspacing.html

Regards,
Khaled
___________________________________________________________________________________
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: Wrong spacing using stretch effect
  2013-10-01  9:45       ` Khaled Hosny
@ 2013-10-01  9:53         ` Philipp Gesang
  2013-10-01 10:17           ` Marco Patzer
  0 siblings, 1 reply; 9+ messages in thread
From: Philipp Gesang @ 2013-10-01  9:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

···<date: 2013-10-01, Tuesday>···<from: Khaled Hosny>···

> On Tue, Oct 01, 2013 at 11:20:52AM +0200, Hans Hagen wrote:
> > On 10/1/2013 10:05 AM, Marco Patzer wrote:
> > >On 2013–09–30 Hans Hagen wrote:
> > >
> > >>these are unrelated mechanisms where the first one just does some
> > >>pdf magic ... no feedback to tex about widths (ok, i could write
> > >>something better but never had and still don't have a reason for
> > >>that kind of low level pdf based approach to be really deeply
> > >>integrated)
> > >
> > >Thanks for the explanation. I was looking for a way to do slight
> > >letter spacing without breaking ligatures and thought I could
> > >leverage the stretch effect for that.
> > 
> > well, we break ligatures because ligatures make no sense in that
> > kind of kerned text (if they make sense at all, but that's a
> > different issue
> 
> Some ligatures should not be broken in letter-spaced text, typically
> represented by rlig in OpenType, e.g. Fraktur ch, ck, ſt and tz
> ligatures:
> http://unifraktur.sourceforge.net/letterspacing.html
 

When using the characterkerning method you can exempt ligatures
and character pairs from being letterspaced by defining the
functions typesetters.kerns.keepligature (<liganode>) and
typesetters.kerns.keeptogether (<prevglyph>, <glyph>),
respectively. If the function returns a truish value for the
given input, ligatures won’t be decomposed and no extra kerning
will be applied.

Best regards
Philipp



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

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

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

* Re: Wrong spacing using stretch effect
  2013-10-01  9:53         ` Philipp Gesang
@ 2013-10-01 10:17           ` Marco Patzer
  2013-10-01 17:58             ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Marco Patzer @ 2013-10-01 10:17 UTC (permalink / raw)
  To: ntg-context


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

On 2013–10–01 Philipp Gesang wrote:

> When using the characterkerning method you can exempt ligatures
> and character pairs from being letterspaced by defining the
> functions typesetters.kerns.keepligature (<liganode>) and
> typesetters.kerns.keeptogether (<prevglyph>, <glyph>),
> respectively. If the function returns a truish value for the
> given input, ligatures won’t be decomposed and no extra kerning
> will be applied.

I didn't know ConTeXt supports that. And it's even highly
customizable. Thank you very much.

Marco

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

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

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

* Re: Wrong spacing using stretch effect
  2013-10-01 10:17           ` Marco Patzer
@ 2013-10-01 17:58             ` Hans Hagen
  2013-10-03 16:47               ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2013-10-01 17:58 UTC (permalink / raw)
  To: ntg-context

On 10/1/2013 12:17 PM, Marco Patzer wrote:
> On 2013–10–01 Philipp Gesang wrote:
>
>> When using the characterkerning method you can exempt ligatures
>> and character pairs from being letterspaced by defining the
>> functions typesetters.kerns.keepligature (<liganode>) and
>> typesetters.kerns.keeptogether (<prevglyph>, <glyph>),
>> respectively. If the function returns a truish value for the
>> given input, ligatures won’t be decomposed and no extra kerning
>> will be applied.
>
> I didn't know ConTeXt supports that. And it's even highly
> customizable. Thank you very much.

in next beta

\starttext

     \definefontfeature[unifraktur][default][goodies=unifraktur]

     \definedfont[UnifrakturCook*unifraktur]

     ſitzen / ch ck ſt tz fi

     \start \kerncharacters[.5]
         ſitzen / ch ck ſt tz fi
     \stop
     ‍
\stoptext

It's a somewhat messy area (e.g. in unifraktur names we see zwj's being 
injected in names) so we control it via a goodie file (predictable at 
least).

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

* Re: Wrong spacing using stretch effect
  2013-10-01 17:58             ` Hans Hagen
@ 2013-10-03 16:47               ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2013-10-03 16:47 UTC (permalink / raw)
  To: ntg-context

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

On 10/1/2013 7:58 PM, Hans Hagen wrote:
> On 10/1/2013 12:17 PM, Marco Patzer wrote:
>> On 2013–10–01 Philipp Gesang wrote:
>>
>>> When using the characterkerning method you can exempt ligatures
>>> and character pairs from being letterspaced by defining the
>>> functions typesetters.kerns.keepligature (<liganode>) and
>>> typesetters.kerns.keeptogether (<prevglyph>, <glyph>),
>>> respectively. If the function returns a truish value for the
>>> given input, ligatures won’t be decomposed and no extra kerning
>>> will be applied.
>>
>> I didn't know ConTeXt supports that. And it's even highly
>> customizable. Thank you very much.

I've added a slightly more advanced control ... not yet uploaded (as 
Idris has to test something else first). See attached. I'm still in 
doubt if we have to add ccmp to the default feature set.

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

[-- Attachment #2: kerning-004.pdf --]
[-- Type: application/pdf, Size: 49519 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2013-10-03 16:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-25 10:32 Wrong spacing using stretch effect Marco Patzer
2013-09-30  8:36 ` Hans Hagen
2013-10-01  8:05   ` Marco Patzer
2013-10-01  9:20     ` Hans Hagen
2013-10-01  9:45       ` Khaled Hosny
2013-10-01  9:53         ` Philipp Gesang
2013-10-01 10:17           ` Marco Patzer
2013-10-01 17:58             ` Hans Hagen
2013-10-03 16:47               ` Hans Hagen

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