Open jsmm opened 2 months ago
Does the version with new javafx from here work? https://builds.jabref.org/jdk-ea/
Can you run in debug mode? https://docs.jabref.org/advanced/debugging-your-library-file#enable-debug-log
2024-09-12 17:35:14 [pool-2-thread-3] org.apache.fontbox.ttf.CmapSubtable.processSubtype14() WARN: Format 14 cmap table is not supported and will be ignored This issue affects only pdf processing, not the jabref ui
If this still show the same issues, can you try this simple javafx reproducer? https://github.com/Siedlerchr/javafxreproducer/actions/runs/10834651194/artifacts/1925778706
Thanks for your reply.
This is from the log of the version with new javafx:
No PostScript name data is provided for the font null
found wrong object number. expected [11870] found [12045]
Format 14 cmap table is not supported and will be ignored
No PostScript name data is provided for the font KCBBHT+Palatino-Bold
Unknown charstring command in glyph 0020 of font AEPIHR+AGaramondPro-Regular
Unknown charstring command in glyph 0020 of font BGDGBW+AGaramondPro-Italic
AAAAJV+HelveticaLTStd-Roman
Unknown charstring command in glyph 0020 of font QATHCS+Sabon-Roman
Unknown charstring command in glyph 0020 of font SJYTEO+AvenirLTStd-Book
Unknown charstring command in glyph h of font Times-Italic
Unknown charstring command in glyph i of font Times-Italic
Unknown charstring command in glyph s of font Times-Italic
Unknown charstring command in glyph s of font Times-Italic
Unknown charstring command in glyph p of font Times-Italic
Unknown charstring command in glyph a of font Times-Italic
Unknown charstring command in glyph g of font Times-Italic
Unknown charstring command in glyph n of font Times-Italic
Unknown charstring command in glyph n of font Times-Italic
Unknown charstring command in glyph l of font Times-Italic
Unknown charstring command in glyph y of font Times-Italic
Unknown charstring command in glyph b of font Times-Italic
Unknown charstring command in glyph k of font Times-Italic
found wrong object number. expected [2383] found [2384]
Unknown charstring command in glyph .notdef of font BHPBLG+TnQ
Format 14 cmap table is not supported and will be ignored
Sorry, that is not related That is only from the pdf parser and has nothing to do with the fonts in jabref ui
Here is a portion of the debug log from the version using new JavaFX, where the issue still persists. Thanks.
...
Okay, thanks for taking the time. It's hard to narrow this down, so might involve a lot of trial and error: Have you tried the javafx reproducer? https://github.com/Siedlerchr/javafxreproducer/actions/runs/10834651194/artifacts/1925778706 Does it show the same issues?
I'm not sure how to proceed with the JavaFX reproducer. Here's what I see from it:
Okay, I just wanted to rule out that it's an issue with JabRef itself. So we now have a minimal reproducer example, but I still have no clue :(
Okay in the hope for some more clues: Can you open the app.bat with an editor and replace the last line with:
pushd %DIR% & %JAVA_EXEC% %CDS_JVM_OPTS% -Dprism.verbose=true -p "%~dp0/../app" -m org.jabreftest.test.javafxreproducer/org.jabreftest.test.javafxreproducer.HelloApplication %* & popd
and then start it again? It should now provide some extensive logs on font loading etc
Closest issue I could find: https://bugs.openjdk.org/browse/JDK-8242617
The issue reported suggests that it is related to an OpenType (.otf) font, that when removed the issue is gone.
The problem seems to be related to rendering (character spacing doesn't seem right) as well as character mapping (If you compare the expected text and the gibberish one you'll notice that it maps always to the same characters, for example 'e' always maps to 'g' and 'h' is mapped to 'j', etc).
The mapping bit is controlled by something called cmap which is part of the font file.
Here is the Command Prompt full output after modifying app.bat and removing all .otf fonts, even though these were system fonts that had been reset previously. The issue persists. Despite the message indicating otherwise, I am not using Windows 10 but Windows 11 Pro, version 23H2, build 22631. Thanks again.
...
Thanks, there is another more debug option: prism.debugfonts
can you post the output with this command line?
pushd %DIR% & %JAVA_EXEC% %CDS_JVM_OPTS% -Dprism.verbose=true -Dprism.debugfonts=true -p "%~dp0/../app" -m org.jabreftest.test.javafxreproducer/org.jabreftest.test.javafxreproducer.HelloApplication %* & popd
@jsmm can you please test the reproducer with the new debug options? That would hopefully be enough to createa a bug rpeort for javafx
I would like to know about the language of the system used. Tried with English, but that worked. Maybe, it is a Chinese setup?
Maybe, we should ship a font by ourselfes? Suggested by https://guigarage.com/2014/10/integrate-custom-fonts-javafx-application-using-css/ (linked from https://stackoverflow.com/q/31344162/873282)
For Chinese chars we have this in the FAQ https://docs.jabref.org/faq/windows#q-i-have-issues-with-the-chinese-display-language-in-windows-10-enterprise.-what-can-i-do
Another approach, define font family? https://stackoverflow.com/questions/67893273/javafx-font-not-being-rendered-correctly
This is an interesting rabbit hole. One can replace the default font: https://www.buildwindows.com/change-windows-font/
Is it a nvidia graphics card?
I had the same issue with Firefox and could solve it by resizing the Window. (This does not help at JabRef)
@Siedlerchr The output of the command you suggested seems to be informative:
I have restored system fonts to default several times, and both segoeui and segoeuib are installed.
@koppor My system language is Spanish (Spain). Intel(R) Iris(R) Xe Graphics.
I am very interested in transitioning from BibDesk for Mac to JabRef for Windows. I apologize for my limited technical knowledge.
Thank you very much for providing this detailed information. This looks very interesting. I will try to file a bug with this info
I installed PDFsam, another JavaFX application, to verify if the same font issue occurs: it does. I haven't encountered any issue with fonts in the many other apps I use.
JabRef version
5.15 (latest release)
Operating system
Windows
Details on version and operating system
Windows 11 Pro 22631
Checked with the latest development build (copy version output from About dialog)
Steps to reproduce the behaviour
JabRef is rendering text with illegible gibberish fonts.
This issue was reported in #10212 and #9423. I have tried the following steps without success:
dism.exe
(with thecleanup-image
option) andsfc /scannow
.The issue occurs only in JabRef, and none of my other apps are affected. The issue persists in JabRef dev 5.16.348.
Could it be reasonable to assume that, regardless of whether this is a Windows issue, the problem is likely related to JabRef’s font settings?
From Log file:
2024-09-12 17:35:14 [pool-2-thread-3] org.apache.fontbox.ttf.CmapSubtable.processSubtype14() WARN: Format 14 cmap table is not supported and will be ignored
Appendix