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
For most fonts, Opentype.js can write a font file using font.download() or font.toArrayBuffer() in a fraction of a second. However, certain fonts that include many characters are subject to extreme runtimes.
This occurs with both Simplified Chinese variants of the Noto family. Using NotoSansSC-Regular.ttf (available here), running font.toArrayBuffer() from the console after loading in the example site took 36 seconds. Similarly, trying to write NotoSerifSC-Regular.otf (available here) running font.toArrayBuffer() took 33 seconds.
Not all CJK fonts are this slow--I tested a couple others from Google Fonts that took 4-5 seconds. However, as I've never experienced anything like this with fonts that only support Latin characters, I'm guessing it's related to the number of glyphs in these fonts.
I will investigate more myself and try and fix in a PR.
For most fonts, Opentype.js can write a font file using
font.download()
orfont.toArrayBuffer()
in a fraction of a second. However, certain fonts that include many characters are subject to extreme runtimes.This occurs with both Simplified Chinese variants of the Noto family. Using
NotoSansSC-Regular.ttf
(available here), runningfont.toArrayBuffer()
from the console after loading in the example site took 36 seconds. Similarly, trying to writeNotoSerifSC-Regular.otf
(available here) runningfont.toArrayBuffer()
took 33 seconds.Not all CJK fonts are this slow--I tested a couple others from Google Fonts that took 4-5 seconds. However, as I've never experienced anything like this with fonts that only support Latin characters, I'm guessing it's related to the number of glyphs in these fonts.
I will investigate more myself and try and fix in a PR.
Your Environment
The text was updated successfully, but these errors were encountered: