How to fix invalid system fonts?

Keylord application can’t be started in some user environments and throw exception before display main window:

Caused by: java.lang.NullPointerException at com.sun.javafx.font.MacFontFinder.populateFontFileNameMap(MacFontFinder.java:99) at com.sun.javafx.font.PrismFontFactory.getFullNameToFileMap(PrismFontFactory.java:1740) at com.sun.javafx.font.PrismFontFactory.getFontResource(PrismFontFactory.java:469) at com.sun.javafx.font.LogicalFont.getSlot0Resource(LogicalFont.java:194) at com.sun.javafx.font.LogicalFont.getDefaultAAMode(LogicalFont.java:409) at com.sun.javafx.font.LogicalFont.getStrike(LogicalFont.java:413) at com.sun.javafx.font.PrismFont.getStrike(PrismFont.java:73) at com.sun.javafx.text.PrismTextLayout.setContent(PrismTextLayout.java:138) at javafx.scene.text.Text.getTextLayout(Text.java:229) ...

The problem related to JDK-8089900 issue but seems like Oracle guys can’t reproduce it or add NPE check to own code about one year. We can’t reproduce it too but seems like exists workaround for this problem described here:

  1. Create backup of fonts directories:
    • ~/Library/Fonts
    • /Library/Fonts
  2. Open Fonts Book through Spotlight or Launchpad
  3. Click File -> Restore Standard Fonts… to restore default fonts.
  4. Run Keylord application. It should start now.
  5. Quit from Keylord application.
  6. Copy font files from backup to font directories.
  7. Keylord still should works after this.

Let us known if it fix your problem with invalid system fonts: support@protonail.com