VsTeXCommentsExtension icon indicating copy to clipboard operation
VsTeXCommentsExtension copied to clipboard

Changing editor font has no effect on rendered tex until VS restart

Open kkm000 opened this issue 3 years ago • 1 comments

Continuing from #78 and #79, I changed the editor font back to Cascadia Mono Regular. This did not change the rendered //tex: block's font:

Closing and re-opening the source file in the editor does not affect rendering font. When opening the file again, a non-rendered form of the comment flashes for a fraction of a second, set in the expected font, but then switches to the rendered form same as above, using the font in effect at VS2022 startup. Toggling edit/render mode for the block also preserves the stale font. The font changes to the same face (but, #79, not always the same size) as the rest of comments after restarting VS2022 only.

A minor glitch with the line number 19 rendered in a different color I'd be all for ignoring.

P.S. If in doubt, look at the shape of the lowercase w. The rendered tex: block font is not a lighter version of Cascadia; the slabs are characteristically Courier.

kkm000 avatar Dec 22 '22 23:12 kkm000

We are saving rendered comments to the file system cache and we store info about the font used for rendering. You can see it (and clear it) here: image

I remember I wasn't able to get information about comments font nicely and notifications about font changes didn't work. See this atrocity: https://github.com/kindermannhubert/VsTeXCommentsExtension/blob/017bc9eb04abb8825b0bcbb1266cbd6936b312f8/VsTeXCommentsExtension/VsSettings.cs#L166-L174

kindermannhubert avatar Dec 23 '22 12:12 kindermannhubert