Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Show HN: Encode arbitrary data into a WOFF2 color font, decode via canvas

A tool called brpack encodes arbitrary data into a WOFF2 color font, which can then be decoded using a canvas element, offering a novel method for data embedding and retrieval.

Background

- WOFF2 is a compressed font format used in web browsers; color fonts (COLR/CPAL) let font glyphs carry color information (like emoji) rather than single-color outlines. - This project (brpack) abuses that format to store arbitrary binary data (images, files, etc.) inside a valid WOFF2 color font file, then recovers the data by rendering the font to a canvas and reading back the pixels. - It's a form of steganography (hiding data in plain sight) and exploits the fact that WOFF2 is highly compressed and normally ignored by security scanners, making it a potentially useful exfiltration or watermarking trick. - The `Show HN` prefix means it was posted directly to Hacker News as the author's personal project; the audience there is interested in clever, often mischievous, low-level engineering hacks.