top | item 41250810 (no title) thriftwy | 1 year ago I wonder if you can load a font from base64 string like you can with images. Then, one may write a pure js library which generates such font from a set of rules on the fly. Catered to a specific use case. discuss order hn newest 9dev|1 year ago That would be: @font-face { font-family: 'foo'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGy …) } jfk13|1 year ago A minor detail, but the MIME type should be `font/woff` (or `font/woff2` if appropriate), not the nonstandard `application/x-...`.(E.g. see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...) ComputerGuru|1 year ago You can load a font that way on the web, I believe.
9dev|1 year ago That would be: @font-face { font-family: 'foo'; src: url(data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAGy …) } jfk13|1 year ago A minor detail, but the MIME type should be `font/woff` (or `font/woff2` if appropriate), not the nonstandard `application/x-...`.(E.g. see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...)
jfk13|1 year ago A minor detail, but the MIME type should be `font/woff` (or `font/woff2` if appropriate), not the nonstandard `application/x-...`.(E.g. see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...)
9dev|1 year ago
jfk13|1 year ago
(E.g. see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_...)
ComputerGuru|1 year ago