2

I find that ConTeXt's letterspacing command does not adjust the interword space the way I'd expect it to. As the letterspacing factor grows, it gets hard to tell words apart, as the spaces between letters and between words become of similar size. (Perhaps it is simply adding the same space factor to both.)

Is this by design? And if so, is there a way to tweak the interword space, to compensate?

(The ConTeXt wiki tells me that \definecharacterkerning takes some extra parameters, but I can't quite tell what they do.)

I'm using ConTeXt MkXL 2025.04.01 12:45.

Edit: To give an example, the chapter titles of Bringhurst's Elements of Typographical Style look something like this (I've eyeballed it, and bear in mind the original uses a different, non-free, font): enter image description here

Using the same factor in ConTeXt's \letterspacing, however, yields enter image description here which is not as legible IMO, and even less so for bigger spacing factors.

But Max Chernoff's answer is workable, and I'll gladly accept it if there's no proper "ConTeXt-y" solution.

Thanks!

\setupbodyfont[ebgaramond] \startTEXpage[offset=1em] %{\spaceskip=.33em \letterspacing[.16]{THE GRAND DESIGN}} \letterspacing[.16]{THE GRAND DESIGN} \stopTEXpage 
1
  • 1
    You can apply a calculated \spaceskip based on the current stretch factor with the stylekey, e.g. \setupcharacterkerning[letterspacing][style=\spaceskip\dimexpression{\plustwo\spaceamount*\characterkerningparameter{factor}+\spaceamount}]. Commented Apr 18 at 10:17

3 Answers 3

5

Mikael or Wolfgang will probably come along with a more “ConTeXt-y” answer, but you can use the primitive \spaceskip for this:

\startTEXpage[offset=1ex] Hello world! {\spaceskip=1in Hello world!} Hello world! \stopTEXpage 

output

It's also possible to override the “space” \fontdimen for a specific font globally, but manipulating \fontdimen is an ugly hack, so I wouldn't really recommend it:

\usebodyfont[modern] {\switchtobodyfont[modern] \rm \fontdimen2\font=1in} {\switchtobodyfont[modern] \it \fontdimen2\font=0pt} \startTEXpage[offset=1ex] Hello world! {\bf Hello world!} {\it Hello world!} Hello world! \stopTEXpage 

output

5

You do not give an example. They do not grow in the same way, the spaces grow faster, and this is probably intentional. We can use some tracing to see this:

\showmakeup[hkern,hglue] \startTEXpage[offset=1TS] \startbuffer AB CD \stopbuffer \getbuffer {\kerncharacters[1]\getbuffer} {\kerncharacters[2]\getbuffer} \stopTEXpage 

We can see that the kerns between A and B (and C and D) grow linearly, proportionally to the emwidth which is 11.993 here. The spaces grow faster than that. It depends on the font, for latin modern we get

(em/3) + 4 * (em/3) * factor 

where em is the emwidth and factor is the factor you set up.

spaces and such

1
  • Sorry, I did have a particular example in mind, but it involved a copyrighted book. I'll try to reproduce it Commented Apr 17 at 22:46
0

For future reference, I ended up following Wolfgang Schuster's comment (which builds on Max Chernoff's answer), by customizing the space skip used within the \letterspacing command:

\setupcharacterkerning[letterspacing][ style=\spaceskip\dimexpression{ 3.0\spaceamount*\characterkerningparameter{factor}+\spaceamount }, ] 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.