I have a brand new TeXLive vanilla installation on my Debian system. Before installing it I had removed all Debian TeX packages. The texmf.cnf
in the installation only contains comments, I did not touch it.
When I pdftex a certain document, TeX starts generating fresh font files as it should and places them into /home/username/.texlive2021
However kpsewhich -var-value TEXMFHOME
reports /home/username/texmf
The user has no TEXMFHOME
set.
Problem 1: I was expecting the fonts to show up on /home/username/texmf
due to the kpsewhich
result. Is my expectation wrong? Where does the used location HOME/.texlive2021
come from, where/who specified the string .texlive2021
?
Problem 2: I have a PHP application connecting pdftex to a server interface. A client makes a GET
on the PHP endpoint and PHP starts pdftex. Now pdftex fails to start the font generation on its own but produces a missfont.log
file in the current working directory of the pdftex process. Why does pdftex fail to start the font generation in the PHP setting while it works in the manual bash setting. The process environment knows PATH
, TEXMFHOME
and HOME
variables. What else is missing here?
Problem 3: When I now manually execute the font commands in missfont.log
the fonts are constructed in /home/username/.texlive2021
as described above under problem 1. When I then use the PHP server endpoint again, pdftex now ignores the TEXMFHOME
environment variable but picks up the HOME
environment variable, appends a .texlive2021
and finds the fonts from the earlier manual run. Why would pdftex ignore the TEXMFHOME
setting? How can I specify this if not in TEXMFHOME
?
Conclusion: I need to get the font construction process running automagically for the PHP service. My access to various error messages is a bit limited in the remote/server/PHP setting, which is why I compare with manual process starting. However the shell started processes (1) behave different than I believe they should (problems 1 and 3) and (2) behave different than the process PHP runs via the exec call (problem 2).
Postscriptum: The core problem was that PHP did not provide the complete environment. First it lacked the variables, Ulrike Fischer pointed out. Second it lacked the path to further Linux tools which are needed in the font generation process.
Best Answer
Regarding your first question:
automatically generated stuff is placed into
texmfvar
andtexmfsysvar
nottexmfhome
.