Class LoadFontDirective

java.lang.Object
ch.tocco.nice2.templating.impl.freemarker.directives.LoadFontDirective
All Implemented Interfaces:
Nice2TemplateDirective, TemplateIdentifiers, freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

public class LoadFontDirective extends Object implements Nice2TemplateDirective, TemplateIdentifiers
Includes a font as '@font-face' CSS. Writes full CSS-block (font included as base64-data-url). Parameters: * name: Name of font. Must equal to file-name (including case) without ending '.ttf'.
  • Constructor Details

    • LoadFontDirective

      public LoadFontDirective()
  • Method Details

    • execute

      public void execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body) throws freemarker.template.TemplateException, IOException
      Specified by:
      execute in interface freemarker.template.TemplateDirectiveModel
      Throws:
      freemarker.template.TemplateException
      IOException