Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better documentation re. limitations of Word Space #538

Open
cfr42 opened this issue Feb 2, 2025 · 0 comments
Open

Better documentation re. limitations of Word Space #538

cfr42 opened this issue Feb 2, 2025 · 0 comments

Comments

@cfr42
Copy link

cfr42 commented Feb 2, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant