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

Will consume more memory? #54

Open
xmejsieoke opened this issue Jul 26, 2024 · 1 comment
Open

Will consume more memory? #54

xmejsieoke opened this issue Jul 26, 2024 · 1 comment

Comments

@xmejsieoke
Copy link

I am gradually replacing native text rendering with Typr.js. Previously, I loaded fonts using @font-face {font-family: "${font.fileName}"; src: url(${font.fileUrl});} to add styles, or @font-face {font-family: "${d.value}"; src: local("${d.label}"), local("${d.postscriptName}");}. Then, using ctx.font = 'xxx' would magically apply the local or remote font. When I use Typr.js, I have to change the way fonts are loaded, so I created an object in the code to store the currently used local or remote fonts. Does this method consume more memory than before, or is there a better way to store fonts?

@photopea
Copy link
Owner

photopea commented Jul 26, 2024 via email

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

2 participants