Enqueuing Themes and Fonts in Crayon

I’ve recently been notified of an issue here once again to do with enqueuing CSS. So I decided to take another look and I believe I’ve improved the Crayon capturing and enqueuing process by cleaning it up a bit. Now you’ll see two new options in settings under Themes and Fonts.

To efficiently enqueue the CSS for themes and fonts in the html header tag the proper way (default) leave these checkboxes ticked. If you’re having issues for some reason with enqueuing not working, you can go for the legacy method and uncheck these boxes. The CSS will then be printed out before each Crayon. Note this will happen each time they are needed, not only once at the top like enqueueing. This is to ensure that the themes and fonts load wherever they appear. It’s better to leave enqueuing on if all works well.

  • http://andrealazzarotto.com/ Lazza

    Are you embedding the TTF files of Monaco and Consolas? If yes, can you tell me where? I don’t want to host copyrighted files in my website…

    • http://aramk.com/ Aram Kocharyan

      they’re in the fonts/ folder… Use Courier New or similar if you’re concerned.

      • http://andrealazzarotto.com/ Lazza

        Thank you. :) I would suggest you include some freely available fonts such as Inconsolata, Liberation Sans Mono, Droid Mono, Ubuntu Mono… Of course if it’s possible, your plugin is still very very good with Monospace. :)