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

Large amount of warnings when setting font #819

Closed
demurgos opened this issue Sep 8, 2021 · 6 comments
Closed

Large amount of warnings when setting font #819

demurgos opened this issue Sep 8, 2021 · 6 comments

Comments

@demurgos
Copy link

demurgos commented Sep 8, 2021

I am trying to compile the following file:

\documentclass{article}
\RequirePackage[sfdefault]{roboto}
\title{My Title}
\begin{document}
    Hello, world.
\end{document}

I use tectonic foo.tex to compile this file.

I expect the file to compile without warnings: Tectonic should download the package and use it to set the default font for the document.

What happens: the PDF is properly generated (with the Roboto font) but I get a very large amount of warnings:

$ tectonic foo.tex
Running TeX ...
warning: roboto.sty:150: 
Requested font "[Roboto-Regular.otf]/OT" at 9.99997pt
warning: roboto.sty:150: Requested font "[Roboto-Regular.otf]/OT" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-Italic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-BoldItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Regular.otf]/OT" at 9.99997pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Regular.otf]/OT" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Italic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-BoldItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:185: Requested font "[RobotoCondensed-Bold.otf]/OT" at 9.99997pt
warning: roboto.sty:185: Requested font "[RobotoCondensed-Bold.otf]/OT" at 10.00003pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Regular.otf]/OT" at 9.99997pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Regular.otf]/OT" at 10.00003pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Regular.otf]/OT:script=DFLT;language=dflt;" at 10.00003pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Bold.otf]/OT:script=DFLT;language=dflt;" at 10.00003pt
warning: roboto.sty:281: Requested font "[Roboto-Medium.otf]/OT" at 9.99997pt
warning: roboto.sty:281: Requested font "[Roboto-Medium.otf]/OT" at 10.00003pt
warning: roboto.sty:281: Requested font "[Roboto-Medium.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:281: Requested font "[Roboto-MediumItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:287: Requested font "[Roboto-Thin.otf]/OT" at 9.99997pt
warning: roboto.sty:287: Requested font "[Roboto-Thin.otf]/OT" at 10.00003pt
warning: roboto.sty:287: Requested font "[Roboto-Thin.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:287: Requested font "[Roboto-ThinItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:293: Requested font "[Roboto-Light.otf]/OT" at 9.99997pt
warning: roboto.sty:293: Requested font "[Roboto-Light.otf]/OT" at 10.00003pt
warning: roboto.sty:293: Requested font "[Roboto-Light.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:293: Requested font "[Roboto-LightItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:299: Requested font "[Roboto-Bold.otf]/OT" at 9.99997pt
warning: roboto.sty:299: Requested font "[Roboto-Bold.otf]/OT" at 10.00003pt
warning: roboto.sty:305: Requested font "[Roboto-Black.otf]/OT" at 9.99997pt
warning: roboto.sty:305: Requested font "[Roboto-Black.otf]/OT" at 10.00003pt
warning: roboto.sty:305: Requested font "[Roboto-Black.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:305: Requested font "[Roboto-BlackItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: foo.tex:4: Requested font "[Roboto-Regular.otf]/OT:script=latn;language=dflt;+pnum;+lnum;mapping=tex-text;" at 10.0pt
Rerunning TeX because "foo.aux" changed ...
warning: roboto.sty:150: 
Requested font "[Roboto-Regular.otf]/OT" at 9.99997pt
warning: roboto.sty:150: Requested font "[Roboto-Regular.otf]/OT" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-Italic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:150: Requested font "[Roboto-BoldItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Regular.otf]/OT" at 9.99997pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Regular.otf]/OT" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-Italic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:177: Requested font "[RobotoCondensed-BoldItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:185: Requested font "[RobotoCondensed-Bold.otf]/OT" at 9.99997pt
warning: roboto.sty:185: Requested font "[RobotoCondensed-Bold.otf]/OT" at 10.00003pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Regular.otf]/OT" at 9.99997pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Regular.otf]/OT" at 10.00003pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Regular.otf]/OT:script=DFLT;language=dflt;" at 10.00003pt
warning: roboto.sty:190: Requested font "[RobotoSlab-Bold.otf]/OT:script=DFLT;language=dflt;" at 10.00003pt
warning: roboto.sty:281: Requested font "[Roboto-Medium.otf]/OT" at 9.99997pt
warning: roboto.sty:281: Requested font "[Roboto-Medium.otf]/OT" at 10.00003pt
warning: roboto.sty:281: Requested font "[Roboto-Medium.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:281: Requested font "[Roboto-MediumItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:287: Requested font "[Roboto-Thin.otf]/OT" at 9.99997pt
warning: roboto.sty:287: Requested font "[Roboto-Thin.otf]/OT" at 10.00003pt
warning: roboto.sty:287: Requested font "[Roboto-Thin.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:287: Requested font "[Roboto-ThinItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:293: Requested font "[Roboto-Light.otf]/OT" at 9.99997pt
warning: roboto.sty:293: Requested font "[Roboto-Light.otf]/OT" at 10.00003pt
warning: roboto.sty:293: Requested font "[Roboto-Light.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:293: Requested font "[Roboto-LightItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:299: Requested font "[Roboto-Bold.otf]/OT" at 9.99997pt
warning: roboto.sty:299: Requested font "[Roboto-Bold.otf]/OT" at 10.00003pt
warning: roboto.sty:305: Requested font "[Roboto-Black.otf]/OT" at 9.99997pt
warning: roboto.sty:305: Requested font "[Roboto-Black.otf]/OT" at 10.00003pt
warning: roboto.sty:305: Requested font "[Roboto-Black.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: roboto.sty:305: Requested font "[Roboto-BlackItalic.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: foo.tex:4: Requested font "[Roboto-Regular.otf]/OT:script=latn;language=dflt;+pnum;+lnum;mapping=tex-text;" at 10.0pt
warning: warnings were issued by the TeX engine; use --print and/or --keep-logs for details.
Running xdvipdfmx ...
Writing `foo.pdf` (2.92 KiB)
Skipped writing 1 intermediate files (use --keep-intermediates to keep them)

Such a large amount of warnings does not help me. I looked for why these warnings happen on the internet but I couldn't find the reason (note: I am only a novice Latex user). The PDF looks properly generated so I don't understand the implication of these warnings. The main issue I have is that these warnings obscure other warnings that may happen while working on my document and hinder legibility.

I am not sure if these spurious warnings are a Tectonic issue, caused by the roboto package itself, or my own configuration. I reported it here because I couldn't find any mention of these warnings anywhere else.

@pkgw
Copy link
Collaborator

pkgw commented Sep 10, 2021

Thanks for your report!

Looking at the origins of the "Requested font" message, it seems that something in your document must be turning on the \XeTeXtracingfonts debugging mode. That's quite odd, but I guess that something in roboto has to be doing that? Either that or some extremely obscure bug is being triggered.

@pkgw
Copy link
Collaborator

pkgw commented Sep 10, 2021

Ah, yes, tectonic -X bundle cat roboto.sty shows a straightforward:

\ifroboto@otf
  \def\roboto@regular{Regular}
  \ifxetex\XeTeXtracingfonts=1\fi
  ...

So the roboto package is just turning on this debugging output unconditionally. We can't do much about that.

I see this kind of behavior pretty often — normally (La)TeX is so verbose that people's packages end up printing out all kinds of chatter and debugging information by default, because what's a little bit more output? With Tectonic's default approach to keep things quiet, individual warnings start becoming noticeable, and that includes the spurious ones that were simply downed out before.

@demurgos
Copy link
Author

Thank you for your reply.
I will try to report the issue to the original package then.

I really like Tectonic's approach because it helps me learn Latex by surfacing actual issues, but in this case it's just that the package is very verbose.

Is there a standard/recommended way for a package to check if debugging should be enabled?

@pkgw
Copy link
Collaborator

pkgw commented Sep 13, 2021

Is there a standard/recommended way for a package to check if debugging should be enabled?

Not that I'm aware of, no. It might make sense to add one, although it would probably take a while for it to get uptake.

I'm going to close this issue because I don't think that there is anything really actionable on the Tectonic side for this. Thanks for reporting! And feel free to comment and/or file another issue if there is more to discuss.

@pkgw pkgw closed this as completed Sep 13, 2021
@rdtennent
Copy link

I'm the maintainer of the roboto package. If I compile the user's file with xelatex, no warnings are generated. So, I believe tectonic is responsible for outputting the warnings.

@rdtennent
Copy link

Just to clarify: xelatex is generating the Requested font messages but these normally go to the log file, not the normal output. So it must be that tectonic has chosen not to elide those messages. Every font package I maintain has \ifxetex\XeTeXtracingfonts=1\fi and nobody has ever complained about it; some users may depend on it.

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