I should also have noted that the font problem only appears when --output-format=dvi is specified. When the output is specified as PDF, the font selection commands work as they should.
Is this because fontspec doesn’t support output to DVI? I searched the fontspec documentation but couldn’t find anything. > Yes — I should have specified my system configuration more clearly. I'm > running lualatex using the 2022 texlive installation on Mac OS X Ventura > 13.6.3, and was attempting to use the system font Optima, which comes > pre-installed with OS X. > >>> I've encountered a curious font problem with lualatex, TikZ, and >>> dvisvgm, and I was wondering if someone could help diagnose the >>> problem. If I use the ?fontspec' package to set the main font to >>> Optima, font selection commands in TikZ diagrams on *later* pages >>> affect the appearance of fonts on *earlier* pages. However, this >>> problem disappears if I use the ?classico' package. >> >> Well if it works with one font setup but not the other then my first >> guess would be that something is wrong with the font. But Optima is >> not in texlive and so it is unclear which font you are actually >> using here and it is not possible to test your example.
