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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
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
···
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
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
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 -----------------------------------------------------------------
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 -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Khaled Hosny
-
Marco Patzer
-
Philipp Gesang