# Does LaTeX consider text color?

In The Elements of Typographic Style (version 3.1, p. 25) by Robert Bringhurst I read:

the density of texture in a written or typeset page is called its color. This has nothing to do with red or green ink; it refers only to the darkness or blackness of the letterforms in mass. Once the demands of legibility and logical order are satisfied, evenness of color is the typographer's normal aim. And color depends on four things: the design of the type, the spacing between the letters, the spacing between the words, and the spacing between the lines. None is independent of the others.

As a user, I typically specify the type and its size as well as the line spacing, whereas LaTeX chooses the spacing between words and letters. All four attributes determine the text color.

Does LaTeX try to achieve an appropriate text color by taking into consideration my choice of type? If so, how does LaTeX do that?

• Nope, it only considers the badness of lines. – StrongBad Oct 4 '17 at 17:24
• For examining the color (controlling it would be another job!), the \colorstretch command of the chickenize package is very useful. – Thérèse Oct 4 '17 at 17:39
• @Thérèse but surely the \chickenize command in that package is more useful:-) – David Carlisle Oct 4 '17 at 19:09
• @Thérèse: Thank you for introducing me to chickenize. This package has some useful commands to optimize line breaking. – lblb Oct 4 '17 at 19:18
• @DavidCarlisle The most useful is \documentclass{article} \usepackage{chickenize} \begin{document} \drawchicken \end{document} – Thérèse Oct 4 '17 at 23:35

The question is starting from an incorrect assumption.

whereas LaTeX chooses the spacing between words and letters.

LaTeX has almost no control over the space between letters and normally does not control the space between words. Both of these are specified as part of the font metrics so they are part of the font design. So effectively you are choosing these things when choosing the font, and the overall effect is a choice of the font designer (or at least the person who set up the tex font metrics for that font)

• I understand that spacing is implemented in the font file. But there must be some alteration to the spacing, because lines are usually even. Is the following how LaTeX works? 1. Add words until, without changing the spacing, an upcoming word does not fit the line. 2. Check if absolute deviation from standard line length is bigger with this word (maybe hyphenating it) or without it. 3. Choose the option with the smaller absolute deviation and then stretch or compress all the words to standard line length. 4. Calculate “badness” and give out a warning if it is bigger than a value X. – Philipp Oct 5 '17 at 13:26
• @Philipp no tex line breaking does not act line by line it does a least cost calculation over a whole paragraph, but the amount inter-word space may stretch or shrink is specified by the font, not by latex, if you design a font designed for very compact work and want close inter-word spacing with little variablity, you can specify that in the font (or font metrics) and tex will use that spacing if the user selects that font. – David Carlisle Oct 5 '17 at 14:23