为什么80%的码农都做不了架构师?>>>
When I call sheet.autoSizeColumn(0) under Linux Server, I got following error message:
java.lang.Error: Probable fatal error:No fonts found.
sun.font.FontManager.getDefaultPhysicalFont(FontManager.java:1089)
sun.font.FontManager.initialiseDeferredFont(FontManager.java:968)
sun.font.CompositeFont.doDeferredInitialisation(CompositeFont.java:254)
sun.font.CompositeFont.getSlotFont(CompositeFont.java:334)
sun.font.CompositeGlyphMapper.initMapper(CompositeGlyphMapper.java:81)
sun.font.CompositeGlyphMapper.
sun.font.CompositeFont.getMapper(CompositeFont.java:390)
sun.font.CompositeFont.canDisplay(CompositeFont.java:416)
java.awt.Font.canDisplayUpTo(Font.java:2041)
java.awt.font.TextLayout.singleFont(TextLayout.java:469)
java.awt.font.TextLayout.
org.apache.poi.ss.util.SheetUtil.getColumnWidth(SheetUtil.java:208)
org.apache.poi.xssf.usermodel.XSSFSheet.autoSizeColumn(XSSFSheet.java:386)
org.apache.poi.xssf.usermodel.XSSFSheet.autoSizeColumn(XSSFSheet.java:369)
That is caused by the Linux font issue. Execute following command can fix this issue:
sudo yum install liberation-*;