Skip to content

add font() definition method #5

@arei

Description

@arei

Add the font() definition method.

This method is important to allow fonts to be bundled by the bundler and making ZephJS "compiled code" standalone as much as possible.

The font definition method takes three arguments:

  • fontName: The name of this font;
  • source: The filename (or inline content) of the font to be applied.
  • details: Object containing the @font-face details for this font.

Given these two attributes the font() method will download the font (if needed) and then create the font for the given custom element using the details specified.

Additionally, the bundler will be updated to inline the font() filename references. This means fonts thus declared will be inlined into the bundled code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestin progressWork on this issue is in progress and a resolution is coming soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions