logoalt Hacker News

peter_d_sherman • today at 9:09 PM • 0 replies • view on HN

This is interesting -- not from the perspective of different fonts (although that's interesting too!), but from the perspective of it's a web page that can apparently render fonts on the fly...

That means that it's probably using some library in JavaScript or WASM to implement that.

If that's the case, then I'm thinking, you know, that functionality, that is, font rendering on demand could, in theory, be placed into a CloudFlare Worker (or other Serverless service, i.e. AWS Lambda, Azure Functions, Google Cloud Functions, OCI Funcions, IBM Cloud Code Engine, Alibaba Function Compute, etc., etc.)...

That could be useful for a variety of applications... including (but not limited to!) word processors, typesetting software, homemade browsers, online games, heck, really anything where custom fonts are needed...

There could be two distinct benefits with this, let's call it a "FaaS" (Fonts as a Service!) idea:

1) No need to bundle/ship/include a font rendering engine with software that needs one.

2) Extra layer of security -- Local font rendering software is typically Turing-Complete, and as such, the local font renderer could potentially run viruses and other unwanted programs. I.e., local font rendering is a security risk. By hermetically sealing that code into serverless function, offsite of the local machine and having that serverless function send only fully rendered font data one way, the attack surface of the font rendering engine is effectively removed from any local PC.

This being said, the disadvantage is that it couldn't be used if the Internet or server or cloud provider is down for any reason.

Graphical font data, once created and downloaded, could however be cached by clients for offline situations / offline usage / offline work.

So, there are some interesting ideas here...