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

script and lang missing in font definition. #349

Closed
u-fischer opened this issue Jan 19, 2019 · 10 comments
Closed

script and lang missing in font definition. #349

u-fischer opened this issue Jan 19, 2019 · 10 comments

Comments

@u-fischer
Copy link
Member

u-fischer commented Jan 19, 2019

Description

fontspec (2019/01/18 v2.6l) writes "Font "OpenSans-Regular" does not contain any OpenType `Script' information." and then doesn't add script and language tag.

Check/indicate

  • [ x] Relevant for XeTeX
  • [ x] Relevant for LuaTeX
  • [ x] Issue tracker has been searched for similar issues?

Minimal example demonstrating the issue

\documentclass{article}
\usepackage{fontspec}
\setmainfont{OpenSans-Regular.ttf}
\begin{document}
blub
\end{document}

Further details

I 'm not sure if the current behaviour is actually more correct, but it is certainly a change. For some fonts (I found opensans, times and arial) I get no script and language tag in the font features.

The log-file says

Package fontspec Info: Font "OpenSans-Regular" does not contain any OpenType
(fontspec)             `Script' information.


Package fontspec Info: Font family 'OpenSans-Regular.ttf(0)' created for font
(fontspec)             'OpenSans-Regular.ttf' with options [Ligatures=TeX].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"[OpenSans-Regular.ttf]:mode=node;+tlig;"

Trying to force the script with e.g. \setmainfont{times.ttf}[Script=Greek] doesn't work.

otfinfo says:

$ otfinfo -s OpenSans-Regular.ttf
latn            Latin
latn.MOL        Latin/Moldavian
latn.ROM        Latin/Romanian

For other fonts it still works. The main difference I saw is that working fonts have DFLT in their script list.

@u-fischer
Copy link
Member Author

u-fischer commented Jan 19, 2019

Additional remark: I do have in the luaotfload testsuite suddenly also quite a number of test failures related to unicode-math. A number of boxes have suddenly a different width. A possible cause could be that the math fonts are loaded without the script=math feature:

[texgyrepagella-math.otf]:mode=base;

And the difference is visible:

image

@RuixiZhang42
Copy link

RuixiZhang42 commented Jan 20, 2019

I can confirm that this is a bug introduced by v2.6l.

% !TeX program = XeLaTeX
\documentclass{article}
\usepackage{unicode-math}% fontspec v2.6l
\setmathfont{TeX Gyre Pagella Math}
\begin{document}
v2.6l: $E_{E_E} 2_{2_2}$
\end{document}

Optical sizes in the OpenType math font no longer work :(.

26l

@wspr
Copy link
Collaborator

wspr commented Jan 20, 2019

Thanks for the detailed analysis. You're right, it is a change, and it is indeed a bug :( I think I have this fixed now in the working code but want to make doubly sure everything is working properly with unicode-math before I release...

@wspr
Copy link
Collaborator

wspr commented Jan 21, 2019

If anyone has the capacity to check the code I'd be much obliged. I'm wary of releasing too soon and missing more bugs!

@u-fischer
Copy link
Member Author

I did run my (luaotfload)-testsuite with the new version (so only with luatex ...). The unicode-math failures are gone, I have one failure because a font id number has changed, but that's imho harmless. I also get a failure because scaling has slightly changed:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{texgyretermes-regular.otf} 
\begin{document}
\fontspec[Scale=MatchLowercase]{texgyrecursor-regular.otf} 

\typeout{font dimen 5: \the\fontdimen5\font}

\typeout{font dimen 8: \the\fontdimen8\font}

\end{document}

This output with 2019/01/18 v2.6l

font dimen 5: 4.49998pt
font dimen 8: 6.07552pt

and with the experimental code

font dimen 5: 4.50005pt
font dimen 8: 6.07559pt

@RuixiZhang42
Copy link

@u-fischer 0911d75 contains the exact same changes in font size, e.g., in feat-scale-match.luatex.tlg and feat-scale-match.xetex.tlg. The change has to do with the 1sp, 2sp and 3sp introduced in 1c1f631, f0d6341 and 0911d75. I suspect this is the desired change.

@u-fischer
Copy link
Member Author

@RuixiZhang42 Ah yes. My testfile is a copy from this one.

@wspr
Copy link
Collaborator

wspr commented Jan 21, 2019 via email

@u-fischer
Copy link
Member Author

I personally don't care much about the scaling difference. But I think an update would be good as the missing script is starting to show e.g. https://tex.stackexchange.com/questions/471565/realscripts-fontspec-update-vs-some-opentype-fonts and https://tex.stackexchange.com/questions/471184/problem-with-prime-and-unicode-math-package

@wspr
Copy link
Collaborator

wspr commented Jan 24, 2019

Scaling is back to normal. New release sent to CTAN.

@wspr wspr closed this as completed Jan 24, 2019
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

3 participants