-
Notifications
You must be signed in to change notification settings - Fork 30
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
Scale option doesn't fully work with LuaLaTeX #287
Comments
The issue now also appear with XeLaTeX. |
As of 2019/01/21, with the newest Problem analysisDuring my test toward latex3/fontspec#349, I realized where this problem came from. The legacy font dimensions’ setups for families 2 and 3 are wrong, because they are simply based on Thus, technically only the math font with Possible solutionIf I changed Therefore, loading the same OpenType math font for the second and the third times should use scale factors which look like the following:
and
|
Oh wow, that’s a good find. Thanks very much!
Currently when a fontspec user says “Scale=1.1” then “Scale=1.2”, the final scaling taken is (maybe of course) “1.2”. But they could be cumulative.
What do you think about the idea for “Scale=1.1,Scale=1.2” to result in a scaling factor of “1.32” ?
This would allow a fontspec solution to fix the u-m problem, and mean that u-m doesn’t need to hook into internals of fontspec.
Alternatively, I could add a new fontspec feature “Scale*” (or “Rescale” ?) that does the cumulative operation. This would be better for backwards compatibility in fontspec, I supposed.
|
I like the idea of fixing this in fontspec; see: latex3/fontspec#350
|
@wspr To be honest, I do not like the new scaling idea, because I think it will cause unnecessary confusion. A “cumulative” scale doesn’t sound right (to me at least). If a new key were to be introduced, I would suggest I do like the current “override”-style method of I also thought about an “additive” approach rather than a “multiplicative” one, i.e.,
Any thoughts? |
I didn't go with the additive scale largely because I didn't think having two approaches would be that useful. (Personally I think additive works better for something in absolute units like "fontsize = fontsize +2pt".) And although I really liked |
thanks again for the bug & analysis closes #287
Maybe the internal TeX rounding error won’t be a problem, but I think it’s worth mentioning here before the next release. Consider the following example: \documentclass{article}
\usepackage{unicode-math}
\newcommand*\temp{0.7}% Play around with scale here
\setmainfont{texgyrepagella-regular.otf}[Scale=\temp]
\setmathfont{texgyrepagella-math.otf}[Scale=\temp]
\begin{document}
$\mathstrut$%
\the\numexpr\fontdimen6\font\par
\the\numexpr\fontdimen6\textfont2, family~2\par
\the\numexpr\fontdimen6\textfont3, family~3
\end{document} which shows that families 2 and 3 are loaded at
I hope this will not cause any real problem as TeX forbids loading the same font at the same scale more than once. On another note, |
BTW, the log file says that |
Consider the following example
The placement of the superscript is incorrect with LuaLaTeX, while it is correct with XeLaTeX. The box is shifted by -3.62994pt with LuaLaTeX, by -10.16402pt with XeLaTeX, meaning that the scaling is not applied to the relevant parameter.
Subscripts are OK (however, XeLaTeX seems to be using a larger shifting down, but it's another matter).
See http://tex.stackexchange.com/questions/232320/superscript-placement-using-unicode-math-with-scaling for reference.
The text was updated successfully, but these errors were encountered: