Skip to content

Better documentation re. limitations of Word Space #538

@cfr42

Description

@cfr42

Ref.: https://tex.stackexchange.com/q/736317/

Regarding Word Space, the manual notes that

Note that TEX’s optimisations in how it loads fonts means that you cannot use this feature
in \addfontfeatures.

While this is true, it sounds as if it is a specific limit on the use of this command and not a more general problem affecting any use of the same underlying \font with different values of Word Space. It does not explain the pervasiveness of the setting or explain that its usefulness is severely restricted.

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\ssp{SourceSerifPro}
\newfontfamily\sspws{SourceSerifPro}[WordSpace = 2]
\begin{document}
\ssp standard: \the\fontdimen 2\font ~ % 4.66pt
\sspws double: \the\fontdimen 2\font ~ % 9.32pt
\ssp standard: \the\fontdimen 2\font ~ % 9.32pt
\end{document}

The standard value for this font is 2.33pt, so neither of the requested values are used for any font at all, even though \ssp is used first.

Moreover, adding apparently irrelevant features can hide the problem.

\documentclass{article}
\usepackage{fontspec}
\newfontfamily\ssp{SourceSerifPro}
\newfontfamily\sspws{SourceSerifPro}[WordSpace = 2,Opacity=1]
\begin{document}
\ssp standard: \the\fontdimen 2\font ~ % 2.33pt
\sspws double: \the\fontdimen 2\font ~ % 4.66pt
\ssp standard: \the\fontdimen 2\font ~ % 2.33pt
\end{document}

Perhaps the documentation should say something like

Note that TEX’s optimisations in how it loads fonts means that you should almost
always prefer \spaceskip to use of this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions