1

I have a brand new TeXLive vanilla installation on my Debian system. Before installing it I had removed all Debian TeX packages. The texmf.cnfin 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 TEXMFHOMEsetting? 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.

3
  • 1
    regarding 1.: automatically generated stuff is placed into texmfvar and texmfsysvar. Nov 9, 2021 at 22:43
  • COOL. Helped me solve 2 and 3 as well. I ran the installer again and realized that I overlooked the choice I can make there. Not knowing about these two env variables I did not set them in the PHP environment. pdftex did start the font generation but mktexpk needs sed. sed was not in the path since I gave PHP only a path to latex & co to separate Linux Tex from vanilla TUG Tex installation. I did not get that part of the error message in the .log, as pdftex has no access to it and, of course, also did not redirect stderr for PHP. Saw the error in the shell and now everything works. Nov 10, 2021 at 13:55
  • Was really helpful. Can I somehow help you to some SE points? You only gave that as comment and more than upvote that here I cannot do. But if you write an answer I can accept the answer. Definitely helped me solve my issues and taught me a lot more. THNX Nov 10, 2021 at 13:56

1 Answer 1

3

Regarding your first question:

automatically generated stuff is placed into texmfvar and texmfsysvar not texmfhome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.