There is no need to implement a fancy database to create a preview.
Most of the speed is due to network and caching decisions: anycasted edge CDN, highly cacheable static CSS responses per family and subset, WOFF2 with Brotli, unicode-range subsetting so that the browser only fetches the required slices, preconnect to fonts.gstatic.com, long max-age with content-hashed URLs, and sane font-display to prevent render blocking.
The server side is largely prebuilt CSS manifests, which makes the responses tiny and immediately cacheable.