This monorepo provides two packages for font optimization in web applications. `fontaine` is a library that automatically generates metric-adjusted CSS `@font-face` fallback rules to reduce Cumulative Layout Shift (CLS). It parses CSS, reads font metrics from files or URLs, and injects override rules with proper `size-adjust`, `ascent-override`, etc. `fontless` is a Vite plugin that builds on top of fontaine and integrates with multiple font providers (Google Fonts, Bunny, FontSource, npm, etc.) to automatically download, subset, and serve optimized fonts with zero runtime JavaScript. It scans CSS for `font-family` declarations, resolves fonts through a provider chain, downloads the actual font files, emits them as build assets, and injects both the primary `@font-face` rules and metric-override fallback families. The codebase is well-structured, has comprehensive test coverage, and follows modern JavaScript/TypeScript practices. It is a hybrid of a library (fontaine) and an application plugin (fontless) but primarily serves as a developer tool for building optimized web fonts.
This is a Hexo theme designed for personal homepages that diverges from traditional blog-focused themes. It implements a 'subpage' system to organize content by broad topics rather than categories, features an interactive timeline for showcasing key events, and includes resume/CV generation capabilities. The theme emphasizes performance through intelligent font subsetting that extracts only the glyphs actually used in site content, particularly beneficial for CJK fonts. Built with Hexo's extension system, it uses Nunjucks templating, Stylus CSS, and vanilla JavaScript for interactivity.