Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add font() definition method #5

Open
arei opened this issue Mar 25, 2019 · 0 comments
Open

add font() definition method #5

arei opened this issue Mar 25, 2019 · 0 comments
Labels
enhancement New feature or request in progress Work on this issue is in progress and a resolution is coming soon

Comments

@arei
Copy link
Member

arei commented Mar 25, 2019

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.

@arei arei added the enhancement New feature or request label Mar 25, 2019
@arei arei added the in progress Work on this issue is in progress and a resolution is coming soon label Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in progress Work on this issue is in progress and a resolution is coming soon
Projects
None yet
Development

No branches or pull requests

1 participant