You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
On Friday 26 July 2024, xmejsieoke ***@***.***> wrote:
I am gradually replacing native text rendering with Typr.js. Previously, I
loaded fonts using @font-face <https://github.com/font-face>
{font-family: "${font.fileName}"; src: url(${font.fileUrl});} to add
styles, or @font-face <https://github.com/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?
—
Reply to this email directly, view it on GitHub
<#54>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADZXMZSWP7DTAXWUJXESLWLZOGULTAVCNFSM6AAAAABLPUARMGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZTCMRWGY3TCMY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
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?
The text was updated successfully, but these errors were encountered: