We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50227
    • 18 Posts
    I'm successfully using PDFResource on the fly with custom fonts but I can't get ComicSansMS to work. This is my config system settings -> pdfresource -> customFonts:
    {
    "Arial":{"R":"arial.ttf","B":"arialbd.ttf","I":"ariali.ttf"},
    "Times":{"R":"times.ttf","B":"timesbd.ttf","I":"timesi.ttf"},
    "FreeMono":{"R":"FreeMono.ttf","B":"FreeMonBold.ttf","I":"FreeMonoOblique.ttf"},
    "ComicSansMS":{"R":"comic_0.ttf","B":"comicbd.ttf","I":"comici.ttf"}
    }
    

    I can change the pdfresource.defaultFont to either of Arial,Times,FreeMono and the resultant on the fly pdf uses the default font chosen and displays correctly.If I set default font to ComicSansMS the resultant pdf dispalys using arial font.

    The comic font files are in the ttfonts folder and the names match the ComicSansMS declaration above.

    Can anyone suggest what the problem might be?

    Many thanks smiley
      • 3749
      • 24,544 Posts
      Try moving ComicSans higher in the list to see if it makes a difference. If the problem is still with ComicSans, you'll know that the problem is with that font, rather than the code that processes the JSON.

      The issue could be the underscore in the file name.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting