Can't upload a font file in PDF Export Language Support
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Platform Notice: Server, Data Center, and Cloud By Request - This article was written for the Atlassian server and data center platforms but may also be useful for Atlassian Cloud customers. If completing instructions in this article would help you, please contact Atlassian Support and mention it.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When trying to upload a new font file to Confluence, you get the error: No font file could be found with the name <your_font_name>
The following appears in the atlassian-confluence.log
2015-03-10 14:52:12,415 ERROR [http-bio-6800-exec-19] [extra.flyingpdf.config.ConfigurePDFLanguageSupportAction] execute Unable to install language font.
-- referer: http://skb.sofer.cn/admin/flyingpdf/configurepdflanguagesupport.action | url: /admin/flyingpdf/doconfigurepdflanguagesupport.action | userName: jacky | action: doconfigurepdflanguagesupport
java.io.IOException: No font file could be found with the name msyh.ttf
at com.atlassian.confluence.extra.flyingpdf.config.FontsDirectoryFontDao.getFont(FontsDirectoryFontDao.java:25)
at com.atlassian.confluence.extra.flyingpdf.config.FontsDirectoryFontDao.removeFont(FontsDirectoryFontDao.java:55)
at com.atlassian.confluence.extra.flyingpdf.config.PdfExportFontManager.installFont(PdfExportFontManager.java:84)
at com.atlassian.confluence.extra.flyingpdf.config.ConfigurePDFLanguageSupportAction.execute(ConfigurePDFLanguageSupportAction.java:32)
Cause
The contents of the bandana table, which stores font metadata and the filesystem, which stores the font file itself are out of sync.
Resolution
- Shutdown Confluence
Run the following SQL query:
update bandana set bandanavalue = '<map> <entry> <string>customfont</string> <string></string> </entry> </map>' where bandanakey = 'com.atlassian.confluence.extra.flyingpdf.fontname'
- Delete anything in the {{<confluence_home>/fonts}} folder
- Restart Confluence
This will reset your fonts settings to their absolute defaults and will allow a new font to be added.