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

Missing instructions on how to build fontkit for brwoser #302

Closed
Typogram opened this issue Feb 13, 2023 · 2 comments
Closed

Missing instructions on how to build fontkit for brwoser #302

Typogram opened this issue Feb 13, 2023 · 2 comments

Comments

@Typogram
Copy link

Typogram commented Feb 13, 2023

@devongovett thanks for providing a working codepen on
#77
Could you provide instruction on how to build fontkit.bundle.js for browser? In the codepen, you import from this link:

/* esm.sh - fontkit@2.0.2 */
export * from "https://esm.sh/v106/fontkit@2.0.2/es2022/fontkit.bundle.js";

Ideally, after run npm run build, the dist folder should include a fontkit.bundle.js ready for browser usage.

@Typogram Typogram changed the title Missing instructions on how to build the library for brwoser Missing instructions on how to build fontkit for brwoser Feb 13, 2023
@Lorp
Copy link

Lorp commented Jul 17, 2023

I made a minimal repo, fontkit-tiny, to demonstrate building Fontkit for the browser:

https://github.com/Lorp/fontkit-tiny

@rsms
Copy link

rsms commented Sep 7, 2023

Here's a bash script that builds a bundled, minified single-file ES module that can be used in modern browsers: https://gist.github.com/rsms/c806aebbf97240f052b8157d0a69e9c6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants