psb1558 / Junicode-font

A new version of Junicode font
SIL Open Font License 1.1
397 stars 17 forks source link

Junicode VF LaTeX package writes fontspec options to document in book document class #285

Closed eclecticfluff closed 2 months ago

eclecticfluff commented 3 months ago

I just switched to using the junicodevf package rather than loading the fonts myself with fontspec and stumbled upon the following bug. image

% !TeX TXS-program:compile = txs:///lualatex/
\documentclass{book}
\usepackage{junicodevf}
\begin{document}
    Breaking in one of those strange and fascinating ways that only \LaTeX{} and friends can.
\end{document}

I haven't tested extensively, but to my knowledge this does not occur with the regular junicode package or in the article document class, but does still happen with junicodevf in scrbook.

For further context, I am on junicodevf version 2.208 and fontspec 2.9e.

psb1558 commented 3 months ago

I can't duplicate this. Can you give more details about your setup and share your pdf and the log file from your tex run? And are you using the junicodevf.sty and junicodevf.lua from CTAN or the one in the Junicode 2.208 release? I'm still using TeXLive 2023 with fontspec 2.8a: I'll have to upgrade so I can test further.

Doc73 commented 3 months ago

Texlive 2024 and I have the same issue. Junicode 2.208 JunicodeVF 2.206 (sic) Fontspec 2.9e

eclecticfluff commented 3 months ago

I got them mixed up, I'm using junicodevf 2.206 as well. Compiled with TeXLive 2024, LuaHBTeX, Version 1.18.0.

Here are the PDF and log files.

psb1558 commented 3 months ago

I'm installing TeXLive 2024 now. Will report back.

psb1558 commented 3 months ago

I've been able to duplicate the issue now. I can say definitely that the junicodevf scripts are not writing that junk into the file—not directly, anyway. Instead, the script or the font or both are somehow triggering this behavior in fontspec. Beyond that, it's a compete mystery. I'll check the fontspec issues and open one if there's no relevant issue there.

psb1558 commented 3 months ago

Okay, I get it now. Hunt down the file junicodevf.sty and change "Junicode VF" in the \setmainfont command to "JunicodeVF." That's all there is to it.

If you're not comfortable digging into your TeXLive installation to edit a file, grab junicodevf.sty and junicodevf.lua from Junicode's GitHub repo and put them in the directory with the document you're working on. LuaLaTeX will use those instead of the TeXLive copy.

When I'm ready for the next release I'll ask Junicode's CTAN maintainer to update the VF package.

psb1558 commented 2 months ago

This fix is now in release 2.209. As I mentioned, I'm going to ask the Junicode maintainer for CTAN to update the variable package.

psb1558 commented 2 months ago

Aaaaaand . . . the new version with the fix is now in CTAN, thanks to Fontissimus Maximus Bob Tennent.