You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the RunFontSelectorCalibriCheckBoxTest fails
java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.fonts.IdentityPlusMapper
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.getFontMapper(WordprocessingMLPackage.java:375)
...
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "org.docx4j.fonts.fop.fonts.CustomFont.getStrippedFontName()" because "customFont" is null [in thread "main"]
at org.docx4j.fonts.IdentityPlusMapper.<clinit>(IdentityPlusMapper.java:77)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.getFontMapper(WordprocessingMLPackage.java:375)
at org.docx4j.fonts.RunFontSelectorCalibriCheckBoxTest.testFont(RunFontSelectorCalibriCheckBoxTest.java:64)
When debugging via Intellij and found out it breaks on loading in the physical font AppleSDGothicNeo which is included by default in mac os in /System/Library/Fonts
This issue might be the same issue as #507 but there's little information there.
The test breaks on loading in IdentityPlusMapper , after trying to load in the discoveryPhysicalFonts which tries to add the font file:/System/Library/Fonts/AppleSDGothicNeo.ttc for which no customFont can be determined at
isCFF being false, it will call new TTFFile(userKerning: true, useAdvanced: false) and throw with error message
'loca' table not found, happens when the font file doesn't contain TrueType outlines (trying to read an OpenType CFF font maybe?)
This is where I ended up.
I'm not very knowledgeable about font types but the structure of this font appears to be different than other system fonts
From what I can gather online, it's a font for the Korean language.
The text was updated successfully, but these errors were encountered:
llmartinll
changed the title
RunFontSelectorCalibriCheckBoxTest failing on loading AppleSDGothicNeo.ttc font for MacOs + java 11
Could not initialize class org.docx4j.fonts.IdentityPlusMapper on loading AppleSDGothicNeo.ttc font for MacOs + java 11
Aug 27, 2024
Good day
This is the first time trying to check out and run the project.
After a cloning the project and running
mvn clean install
onI noticed that the
RunFontSelectorCalibriCheckBoxTest
failsWhen debugging via Intellij and found out it breaks on loading in the physical font
AppleSDGothicNeo
which is included by default in mac os in/System/Library/Fonts
This issue might be the same issue as #507 but there's little information there.
The test breaks on loading in
IdentityPlusMapper
, after trying to load in thediscoveryPhysicalFonts
which tries to add the fontfile:/System/Library/Fonts/AppleSDGothicNeo.ttc
for which nocustomFont
can be determined atdocx4j/docx4j-core/src/main/java/org/docx4j/fonts/fop/fonts/autodetect/FontInfoFinder.java
Line 242 in c097975
which re-sets
customFont
tonull
which causes code further down the chain to throw.In attempt to find out why it could not load the font; I found out that it throws an IO exception at
docx4j/docx4j-core/src/main/java/org/docx4j/fonts/fop/fonts/truetype/OFFontLoader.java
Line 120 in c097975
isCFF
beingfalse
, it will callnew TTFFile(userKerning: true, useAdvanced: false)
and throw with error messageThis is where I ended up.
I'm not very knowledgeable about font types but the structure of this font appears to be different than other system fonts
From what I can gather online, it's a font for the Korean language.
The text was updated successfully, but these errors were encountered: