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

Feature: font packages #965

Open
LuckyTurtleDev opened this issue Oct 31, 2022 · 18 comments
Open

Feature: font packages #965

LuckyTurtleDev opened this issue Oct 31, 2022 · 18 comments

Comments

@LuckyTurtleDev
Copy link

I think it would be a nice feature, if tectonic can also provide fonts as package and download it automatically. So the user must not install the font manual if it is not installed at the system.
This is would be very useful if you work on the same document with other inexperienced users, with does not use the same operating system.

@pkgw
Copy link
Collaborator

pkgw commented Nov 1, 2022

We already provide a lot of fonts in the standard bundle — at least, the ones that we are allowed to redistribute. The "problem" with a lot of other fonts is that we're legally disallowed from redistributing them in a packaged format. (I put that in scare-quotes since fonts are really hard and time-consuming to make and it's totally reasonable for a font creator to want to restrict access to it in various ways.) Do you have a particular example font in mind?

@LuckyTurtleDev
Copy link
Author

LuckyTurtleDev commented Nov 1, 2022

I am using Source Serif 4, Noto Sans and Source Code Pro.

\setromanfont{Source Serif 4}
\setsansfont{Noto Sans}[BoldFont=* Bold]
\setmonofont{Source Code Pro}

All of them are packaged by Arch Linux, so I think it should be no problem to also package them with tectonic.

It looks like none of them are current available at tectonic, I had to install all of them manual at the ci.

@9SMTM6
Copy link

9SMTM6 commented Nov 11, 2022

They are available, you just have to use the packages. TeX usually distributes fonts via packages.

Here is eg Noto Sans:

https://www.ctan.org/pkg/noto

this - I assume - is also in the tectonic... package bundle if thats what you call it. It will be downloaded automatically just like the other packages.

When looking at the fonts you have to ensure that they support Xe(La)TeX, I've seen a few fonts that wont, these wont se supported, otherwise, other than some verbose logging from the Roboto font package thats been addressed in another issue, and some fonts not being available as packages (notably the nerdfont variants which I use for stuff like language icons) I've not had issues.

@Neved4
Copy link

Neved4 commented Nov 16, 2022

Hey @LuckyTurtleDev, thanks for the interesting issue!

I believe it's a topic that has ramifications so I'm going to outline them:

Formats

TeX Live uses its own font system called METAFONT. To be used natively fonts would have to be converted to that format. Using it would be like invoking any other package, e.g.:

\usepackage{ebgaramond}

Currently, in modern typography, TrueType (TTF) and OpenType (OTF) are the formats most used. So a bunch of people decided to make a package to use these formats: fontspec.

It requires XeLaTeX or LuaLaTeX, so you can't use it for pdfLaTeX, but it allows you to use the fonts installed in your system e.g.:

\usepackage{fontspec}
  \setmainfont{Adobe Garamond Pro}

Both LuaLaTeX and XeLaTeX, have their own font lookup mechanisms when using fontspec, that work similarly but different, plus font packages and system fonts are not the same.

Reproducibility

Another aspect: reproducibility. Being LaTeX a high-quality typesetting system one starts thinking how interesting or important can be to reproduce a document content with its original format it was intended to. Part of this format can be, yes, fonts. Some of them have glyphs, ligatures or symbols that are different to others, and while it's a good praxis to use the already big and growing collection of built-in TeX Live symbols, eventually you'll find something that it's not there, or a shape you just like more in a font than another. One could just switch fonts, but it won't look the same, and thus it's not the same.

Font licensing aside and the challenges it poses to reproduce sources and outputs, I'm quite fond of including additional domains to further improve reproducibility, and currently tectonic only covers some aspects of it.

Usability and Implementation

Wouldn't it be amazing if we could get the free fonts bundled, away from managing their installation and having a single tool (tectonic) that will do all the work for us? Sounds great! But we'd have to be specific about some details:

  1. Since fontspec searches fonts installed in the system, tectonic would have to install those fonts to the system.

    • How we should install the fonts? Each platform has their own architecture, write to a directory list for every one?
  2. When should the packages be installed.

    • When should tectonic install said fonts? For everyone else? On compilation time only? Downloading all free fonts default is not very graceful to users and goes against having a download with the bare minimum for basic documents. Otherwise we need to manage the fonts, and this overlaps with another challenge: package management.
  3. Skip system installation entirely, and just ship the fonts with tectonic.

    • This avoids us dealing with system specifics, we could bundle the fonts inside tectonic's cache. It's a simple approach but it doesn't come without gotchas, you'd have to always write:

      \setmainfont{~/.cache/Tectonic/fonts/Noto Sans}

      It's not clean and least pretty.

      Of course, this would only work for Linux, since under macOS the cache is inside ~/Library/Caches/Tectonic, making document differences incompatible across platforms and damaging reproducibility.

  4. Let's use enviroment variables! That'll fix it!

    • That's the TeX Live way, but as of now tectonic doesn't really have something like TEXMFHOME.
  5. Let's generate the path dynamically based on an already existing env var!

    • We could have something like $TECTONIC_CACHE to point the fonts to, but env vars don't work in a direct way under LaTeX, and they require some wrapper code to do the expansions correctly, see: https://tex.stackexchange.com/a/583976.
  6. Make tectonic communicate with fontspec, somehow, someway

    • This is smart but we'd need to make concrete how that inter-communication could take place.
  7. Modify fontspec so it searches for fonts inside tectonic cache paths.

    • This one would solve many of the issues above, but it requires writing support for it.

Summary

In the TeX Live world, its package manager tlmgr doesn't download or manage third-party TTF/OTF free fonts. They gave up on it and, unless something is packaged/converted to METAFONT you need to use the OS/distro package manager.

While it's not an impossible thing to achieve, you can see the issue is a bit more involved than just bundling the fonts.

@9SMTM6
Copy link

9SMTM6 commented Nov 16, 2022

I've not been able to make fontspec work with installed fonts on windows btw.

If it is of interest, this is a project that uses a setup close to my current one:

https://gitlab.rz.hft-stuttgart.de/02masa1bif/prog1tut_veranstaltung5

It should be open for public.

In that case I download the nerdfont font ttf (or otf) files to the src directory before the build, that's been the only way I've been able to get it to run on Windows too. For now I've given up on keeping that directory free of noise with latex.

Sadly could not find something like a CDN link, so who knows whether that link for downloading the font will stay online...

I'm aware of the fontawsome symbol package, didn't have to time to look at all the other ways. Sadly fontawsome didn't have symbols for all languages. And the nerdfont patch includes fontawsome so once I decided for a nerdfont for the added symbols I got rid of fontawsome and instead created commands which allow easy access to the symbols I need, eg.

\newcommand{\consoleicon}{{\large\ttfamily }}

Where I copied the symbol from https://www.nerdfonts.com/cheat-sheet.

@LuckyTurtleDev
Copy link
Author

@mnrvwl I did not expect that using a custom font would be so complex. I had though that it would simple be possible that tectonic can save the TTF/OTF to a folder and give fontspec a hint to check out also this font at this folder.

@9SMTM6 I will define checkout out the package an ctan.org. I did not know that "normal" Latex can also package fonts.

@Neved4
Copy link

Neved4 commented Nov 16, 2022

@LuckyTurtleDev If fontspec starts supporting tectonic standard cache folders it should be rather easy and straightforward.
Otherwise, I'm not aware how tectonic could hint fontspec, I'm open to ideas.

@LuckyTurtleDev
Copy link
Author

LuckyTurtleDev commented Nov 16, 2022

Maybe a merge request to fontec, witch add support to load additional fonts from paths/files definded by enviroment variables would solve this issue. Tectonic can download the fonts to the fontex folder and define the env before calling latex.

Another option would be that tectonic install fonts at the os. But this must be implentated for each operating system.

However tectonic should maybe check if the font is allready installed and not perform any action than.

@vlasakm
Copy link
Contributor

vlasakm commented Nov 17, 2022

I assume that all fonts that are on CTAN (and hence in TeX Live - barring licensing). These include the ones mentioned above:

I can confirm that by do something like tectonic -X bundle search Noto and seeing a bunch of .otf files.

Great! Now how do I use them? Well, easily if I require the fonts by their file names. Then it is Tectonic that is able to match the paths (in its handling of TeX paths).

Thus the following works:

\documentclass{article}

\usepackage{fontspec}

\setromanfont{SourceSerifPro}[
	Extension      = .otf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-RegularIt,
	BoldItalicFont = *-BoldIt]

\setsansfont{NotoSans}[
	Extension      = .ttf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-Italic,
	BoldItalicFont = *-BoldItalic]

\setmonofont{SourceCodePro}[
	Extension      = .otf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-RegularIt,
	BoldItalicFont = *-BoldIt]


\begin{document}

\textrm{a} \textsf{b} \texttt{c}

\end{document}

How did I find out how to set this up exactly like this? I executed variations on this:

tectonic -X bundle search NotoSans | grep ttf | grep NotoSans- | grep -v -e Semi -e Extra -e Medium -e Thin -e Black -e Light
  1. I was looking for .otf or .ttf files.
  2. I filtered out other font families (Noto Sans Mono)
  3. I excluded the thickness variants I was not interested in.

IMO this setup has quite a few advantages:

  • You know exactly what you get: (AFAIK) the file names are pretty stable, I choose exactly the variants I want to use. There is no fontconfig or Tectonic applying any smartness, they are just matching font names.
  • You don't have to look into documentation of packages like noto for exact options on how to achieve what you want.

But:

  • Because you are not using a package, and specify the font options manually I have to think about things like Ligatures = TeX, Scale and other options (see fontspec manual) that the packages might take care of.

For me personally even the last point is an advantage, because I like to have control (especially when different font packages would interact like in this noto / source serif/code case) and be explicit (perhaps the -Regular is the default, but I still like specifying it).

So why doesn't the below "obvious" work?

\setromanfont{Source Serif 4}
\setsansfont{Noto Sans}[BoldFont=* Bold]
\setmonofont{Source Code Pro}

Since these "font names" aren't "font file names", but real "font names" Tectonic can't easily map them directly to font files and take them from the "TeX bundle". The search thus falls back to XeTeX's logic of handling system fonts, which uses (at least on Linux) Fontconfig and your specific font config configuration files, which don't include Tectonic.

Now what I have described is #9. Khaled Hosny has already offered a suggestion on how Tectonic can teach the system Fontconfig to also look for other font files. But AFAICT this would be really hard to apply to Tectonic's use case (downloading and caching the files from the internet, not having the files stored and indexed upfront). It is also possible that Tectonic uses other interfaces than Fontconfig on other operating systems (macOS, Windows).

All in all: Solving #9 is hard. With the TeX model especially with many layers of abstraction I think that specifying fonts by file names rather than font names should be preferred (this bypasses any weird system library differences and also differences between XeTeX and LuaTeX). Packages (usually?) do use font file names, so you may find luck by just doing \usepackage{noto}, though I personally don't like that.

@vlasakm
Copy link
Contributor

vlasakm commented Nov 17, 2022

By the way: I think that Tectonic already distributes all fonts that it can (i.e. are uploaded to CTAN and their license allows it). So by that logic this issue is should be closed.

Other than that #9 is already discussing the possibility use Tectonic fonts even when direct font file name mapping fails. But if the problem is now more clear, feel free to open more specific issues. (Including a MWE helps a lot.)

@LuckyTurtleDev
Copy link
Author

@vlasakm thans your example does work, but it does also create a lots of warning:

warning: noto.sty:171:
Requested font "[NotoSans-Regular.ttf]/OT" at 9.99997pt
warning: noto.sty:171: Requested font "[NotoSans-Regular.ttf]/OT" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-Regular.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-Bold.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-Italic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-BoldItalic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT" at 9.99997pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Bold.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Italic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-BoldItalic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT:script=latn;language=dflt;+tnum;+lnum;mapping=tex-text;" at 10.0pt
warning: noto.sty:194: Requested font "[NotoSansMono-Regular.ttf]/OT" at 9.99997pt
warning: noto.sty:194: Requested font "[NotoSansMono-Regular.ttf]/OT" at 10.00003pt
warning: noto.sty:194: Requested font "[NotoSansMono-Regular.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:194: Requested font "[NotoSansMono-Bold.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT" at 9.99997pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-RegularIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-BoldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;+pnum;mapping=tex-text;" at 10.0pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Light.otf]/OT" at 9.99997pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Light.otf]/OT" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Light.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Semibold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-LightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-SemiboldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLight.otf]/OT" at 9.99997pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLight.otf]/OT" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLight.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-Black.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-BlackIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Regular.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Regular.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-RegularIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-BoldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-Medium.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-Medium.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-Medium.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-MediumIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Light.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Light.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Light.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Semibold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-LightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-SemiboldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLight.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLight.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLight.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-Black.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-BlackIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: ../u.sty:10: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: ulem.sty:243: Requested font "lasy6" scaled 1000
warning: ulem.sty:243:  -> lasy6
warning: hyperref.sty:4873: Requested font "pzdr" at 0.00002pt
warning: hyperref.sty:4873:  -> pzdr
warning: blatt3.tex:9: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 7.0pt
warning: blatt3.tex:9: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 5.0pt
warning: blatt3.tex:9: Requested font "cmex7" at 7.0pt
warning: blatt3.tex:9:  -> cmex7
warning: blatt3.tex:9: Requested font "cmex7" at 5.0pt
warning: blatt3.tex:9:  -> cmex7
warning: blatt3.tex:9:
Requested font "msam10" at 10.0pt
warning: blatt3.tex:9:  -> msam10
warning: blatt3.tex:9: Requested font "msam7" at 7.0pt
warning: blatt3.tex:9:  -> msam7
warning: blatt3.tex:9: Requested font "msam5" at 5.0pt
warning: blatt3.tex:9:  -> msam5
warning: blatt3.tex:9:
Requested font "msbm10" at 10.0pt
warning: blatt3.tex:9:  -> msbm10
warning: blatt3.tex:9: Requested font "msbm7" at 7.0pt
warning: blatt3.tex:9:  -> msbm7
warning: blatt3.tex:9: Requested font "msbm5" at 5.0pt
warning: blatt3.tex:9:  -> msbm5
warning: blatt3.tex:9:
Requested font "stmary10" at 10.0pt
warning: blatt3.tex:9:  -> stmary10
warning: blatt3.tex:9: Requested font "stmary7" at 7.0pt
warning: blatt3.tex:9:  -> stmary7
warning: blatt3.tex:9: Requested font "stmary5" at 5.0pt
warning: blatt3.tex:9:  -> stmary5
warning: aufgabe1:1:
Requested font "[NotoSans-Regular.ttf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: aufgabe1:1: Requested font "[NotoSans-Bold.ttf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: aufgabe1:1: Requested font "[NotoSans-Bold.ttf]/OT:script=latn;language=dflt;mapping=tex-text;" at 12.0pt
warning: aufgabe1:4: Requested font "[SourceSerifPro-Bold.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: blatt3.tex:26: Requested font "[SourceSerifPro-RegularIt.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
Rerunning TeX because "blatt3.aux" changed ...
warning: noto.sty:171:
Requested font "[NotoSans-Regular.ttf]/OT" at 9.99997pt
warning: noto.sty:171: Requested font "[NotoSans-Regular.ttf]/OT" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-Regular.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-Bold.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-Italic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:171: Requested font "[NotoSans-BoldItalic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT" at 9.99997pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Bold.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Italic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-BoldItalic.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:183: Requested font "[NotoSerif-Regular.ttf]/OT:script=latn;language=dflt;+tnum;+lnum;mapping=tex-text;" at 10.0pt
warning: noto.sty:194: Requested font "[NotoSansMono-Regular.ttf]/OT" at 9.99997pt
warning: noto.sty:194: Requested font "[NotoSansMono-Regular.ttf]/OT" at 10.00003pt
warning: noto.sty:194: Requested font "[NotoSansMono-Regular.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: noto.sty:194: Requested font "[NotoSansMono-Bold.ttf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT" at 9.99997pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-RegularIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-BoldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:120: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;+pnum;mapping=tex-text;" at 10.0pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Light.otf]/OT" at 9.99997pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Light.otf]/OT" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Light.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-Semibold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-LightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:138: Requested font "[SourceSerifPro-SemiboldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLight.otf]/OT" at 9.99997pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLight.otf]/OT" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLight.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-Black.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-ExtraLightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourceserifpro.sty:146: Requested font "[SourceSerifPro-BlackIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Regular.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Regular.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Regular.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-Bold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-RegularIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:121: Requested font "[SourceCodePro-BoldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-Medium.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-Medium.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-Medium.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:139: Requested font "[SourceCodePro-MediumIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Light.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Light.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Light.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-Semibold.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-LightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:147: Requested font "[SourceCodePro-SemiboldIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLight.otf]/OT" at 9.99997pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLight.otf]/OT" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLight.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-Black.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-ExtraLightIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: sourcecodepro.sty:155: Requested font "[SourceCodePro-BlackIt.otf]/OT:script=latn;language=dflt;" at 10.00003pt
warning: ../u.sty:10: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: ulem.sty:243: Requested font "lasy6" scaled 1000
warning: ulem.sty:243:  -> lasy6
warning: hyperref.sty:4873: Requested font "pzdr" at 0.00002pt
warning: hyperref.sty:4873:  -> pzdr
warning: blatt3.tex:9: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 7.0pt
warning: blatt3.tex:9: Requested font "[SourceSerifPro-Regular.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 5.0pt
warning: blatt3.tex:9: Requested font "cmex7" at 7.0pt
warning: blatt3.tex:9:  -> cmex7
warning: blatt3.tex:9: Requested font "cmex7" at 5.0pt
warning: blatt3.tex:9:  -> cmex7
warning: blatt3.tex:9:
Requested font "msam10" at 10.0pt
warning: blatt3.tex:9:  -> msam10
warning: blatt3.tex:9: Requested font "msam7" at 7.0pt
warning: blatt3.tex:9:  -> msam7
warning: blatt3.tex:9: Requested font "msam5" at 5.0pt
warning: blatt3.tex:9:  -> msam5
warning: blatt3.tex:9:
Requested font "msbm10" at 10.0pt
warning: blatt3.tex:9:  -> msbm10
warning: blatt3.tex:9: Requested font "msbm7" at 7.0pt
warning: blatt3.tex:9:  -> msbm7
warning: blatt3.tex:9: Requested font "msbm5" at 5.0pt
warning: blatt3.tex:9:  -> msbm5
warning: blatt3.tex:9:
Requested font "stmary10" at 10.0pt
warning: blatt3.tex:9:  -> stmary10
warning: blatt3.tex:9: Requested font "stmary7" at 7.0pt
warning: blatt3.tex:9:  -> stmary7
warning: blatt3.tex:9: Requested font "stmary5" at 5.0pt
warning: blatt3.tex:9:  -> stmary5
warning: aufgabe1:1:
Requested font "[NotoSans-Regular.ttf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: aufgabe1:1: Requested font "[NotoSans-Bold.ttf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: aufgabe1:1: Requested font "[NotoSans-Bold.ttf]/OT:script=latn;language=dflt;mapping=tex-text;" at 12.0pt
warning: aufgabe1:4: Requested font "[SourceSerifPro-Bold.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: blatt3.tex:26: Requested font "[SourceSerifPro-RegularIt.otf]/OT:script=latn;language=dflt;mapping=tex-text;" at 10.0pt
warning: warnings were issued by the TeX engine; use --print and/or --keep-logs for details.

@vlasakm
Copy link
Contributor

vlasakm commented Nov 26, 2022

Just to be sure: is it that the following works without warnings:

\documentclass{article}

\usepackage{fontspec}

\setromanfont{SourceSerifPro}[
	Extension      = .otf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-RegularIt,
	BoldItalicFont = *-BoldIt]

\setsansfont{NotoSans}[
	Extension      = .ttf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-Italic,
	BoldItalicFont = *-BoldItalic]

\setmonofont{SourceCodePro}[
	Extension      = .otf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-RegularIt,
	BoldItalicFont = *-BoldIt]


\begin{document}

\textrm{a} \textsf{b} \texttt{c}

\end{document}

and something like:

\documentclass{article}

\usepackage{noto}
\usepackage{sourceserifpro}
\usepackage{sourcecodepro}

\begin{document}

\textrm{a} \textsf{b} \texttt{c}

\end{document}

produces warnings like in your excerpt?

In that case what you see what is #819 and #924. In short some font packages turn on tracing of fonts, which ultimately results in warnings in Tectonic (see the mentioned issues for details). This is gradually getting fixed in the packages, though it may take time before this hits Tectonic.

@LuckyTurtleDev
Copy link
Author

I have do the following think, witch does look pretty similar:

\usepackage{fontspec}
\usepackage{noto}
\usepackage{sourceserifpro}
\usepackage{sourcecodepro}
\setromanfont{SourceSerifPro}[
	Extension      = .otf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-RegularIt,
	BoldItalicFont = *-BoldIt]

\setsansfont{NotoSans}[
	Extension      = .ttf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-Italic,
	BoldItalicFont = *-BoldItalic]

\setmonofont{SourceCodePro}[
	Extension      = .otf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-RegularIt,
	BoldItalicFont = *-BoldIt]

example.zip

@vlasakm
Copy link
Contributor

vlasakm commented Nov 27, 2022

TL;DR: Delete the lines:

\usepackage{noto}
\usepackage{sourceserifpro}
\usepackage{sourcecodepro}

I am not near a computer at the moment, though it looks like you are loading both the font packages (\usepackage{noto}, etc.), but also set the fonts manually (by loading fontspec and then executing \set...font).

You should only do one (the latter mostly overrides the former). And because \setromanfont etc. allow you to be much more specific I recommend that approach. It also avoids the warnings emitted by some font packages, which are due to #924.

To explain a bit more: what \usepackage{noto} does is that it loads the filenoto.sty which contains more elaborate version of (from top of my head, I actually don't use packages like these):

\setromanfont{NotoSerif}[
	Extension      = .ttf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-Italic,
	BoldItalicFont = *-BoldItalic]

\setsansfont{NotoSans}[
	Extension      = .ttf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-Italic,
	BoldItalicFont = *-BoldItalic]

\setmonofont{NotoSansMono}[
	Extension      = .ttf,
	UprightFont    = *-Regular,
	BoldFont       = *-Bold,
	ItalicFont     = *-Italic,
	BoldItalicFont = *-BoldItalic]

But it has options to let you control the weights, it also sets serif and mono fonts, etc. So even though the .ttf files are part of the noto package, you don't have to \usepackage{noto} to use them. This applies to Tectonic just like any other TeX.

@LuckyTurtleDev
Copy link
Author

TL;DR: Delete the lines:

Thanks that has fix the warnings

@yozachar
Copy link

yozachar commented Nov 25, 2023

Similar to #965 (comment) I can reproduce the warnings here: ccebinger/CTAN_Inter#6 (comment).

ccebinger/CTAN_Inter#6 (comment) suggest that it's because tectonic is using an older version of LaTeX. (here Inter font).

@vlasakm
Copy link
Contributor

vlasakm commented Nov 25, 2023

Similar to #965 (comment) I can reproduce the warnings here: ccebinger/CTAN_Inter#6 (comment).

FWIW this issue is being tracked in #924 and the Inter font is mentioned as well.

ccebinger/CTAN_Inter#6 (comment) suggest that it's because tectonic is using an older version of LaTeX. (here Inter font).

It is great that the package got fixed! Unfortunately it is true, that Tectonic is using an old version of the package. Currently Tectonic uses TeX Live 2022 (as released on 2022-03-21) and the Inter got updated in TeX Live only on 2023-07-21. This unfortunately means that this update missed even TeX Live 2023 release (2023-03-13) and will get into TeX Live 2024 (expected March 2024).

Tectonic has been lagging behind TeX Live releases, but with the great work in tectonic-typesetting/tectonic-texlive-bundles#14 updating Tectonic bundles to new TeX Live is getting much easier. Patching infrustructure has also improved there, so patching the font packages will be easier and hopefully we will get the fix there soon with the release of the Tectonic TeX Live 2023 bundle.

@timoteostewart
Copy link

In case it's of use to anyone on this thread (since a quick search on "tex live 2024" brought me here), the TeX Live 2024 ISO is available now via torrent and magnet link:

https://www.texastim.dev/texlive/2024/03/12/texlive.html

The usual official TeX Live "Acquiring TeX Live as an ISO image" web page isn't updated yet with the new torrent file, but that should happen in the next day or two (or so Karl Berry tells me).

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

7 participants