Skip to content

Add browser support for SVG fonts #6

@jvolker

Description

@jvolker

I've developed a browser-based SVG font renderer: https://github.com/jvolker/svg-font-renderer It borrows a lot of code from this repository. Thanks for writing and sharing it. :)

Instead of using a modified version of this package, it would be great to use it as a dependency. Unfortunately, that's not possible at the moment, as hersheytextjs requires fs which is not available in the browser.

This is how I've adapted it to be used with SVG fonts in the browser: https://github.com/jvolker/svg-font-renderer/blob/master/src/lib/svgFontRenderer.js I've basically skipped fs and passed the SVG data directly from my main application.

Would be great to see this in the future. 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions