mliebelt / pgn-viewer

Simple PGN viewer with the necessary features to display chess games
GNU General Public License v3.0
161 stars 44 forks source link

NAG breaks spacing ? #415

Open braoult opened 1 year ago

braoult commented 1 year ago

I found the issue on some of my games, and was able to reproduce it on configurator:

nag

To reproduce: To do that, just choose Evergreen (no boards) game in Configurator, and add the $15 () NAG after one move (in example above, it was after 4... Bxb4). The space above the line becomes doubled.

I believe it could be a font issue, if the NAG character is not found... I have no idea on what should be done.

Maybe linked (on Firefox 109.0 64 bits, Xubuntu 22.10) to two fonts errors that I noticed in console ?

font-error

EDIT: Some other NAGS (like $16, ±) do not have this issue. Having a look further in Firefox, selecting the character shows the fonts used :

mliebelt commented 1 year ago

I tried to reproduce your error, but failed. I tried with the following browsers:

and of course no error in the console (only Firefox shows that 2 errors(. So sorry, what do I have to reproduce your error then? The following is the screenshot from Firefox.

image

braoult commented 1 year ago

I tried on my wife computer (Ubuntu 22.04, FF 105.0.1). I did not install anything fancy on that one, and I have the same issue : pgnviewer-mac

Looking at the , is uses also the STIXMath-Regular font.

I made different tests:

As display is fine on your own Firefox/Ubuntu, is it possible you have installed a copy of CAChess font on your system ?

mliebelt commented 1 year ago

You were right, the font is installed locally. I try to understand what is included in the distribution (I compiled somehow a file CAChess-min.woff, which seems to be wrong), and how to fix it.

mliebelt commented 1 year ago

Doing the same locally, I see the following information:

I have no idea what is going wrong here. When I disable / deinstall the rendered font, I will get at some point in time the same error, I suspect. Not sure how to proceed here. I cannot understand why the provided font is not used. But perhaps the error message indicates just that.

I will do the following:

  1. Use locally a different font file when building the software.
  2. Running it locally then to see if that different font is then used instead.
  3. Try to understand what the error message means ...