bevyengine / bevyengine/bevy

Support for WOFF2 compressed font files

Open
#12,194 1 comment 6 reactions 0 assignees View on GitHub
A-Text C-Feature
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

[WOFF and WOFF2](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fonts/WOFF) are web-based font formats that offer advanced compression of underlying TTF/OTF font data. Given that bevy applications can also target the web, the same kinds of download size concerns apply here, so it would be nice to support this format.

## What solution would you like?

Ideally the `FontLoader` would transparently support `.woff2` files and do whatever is necessary to decompress them during load time.

## What alternative(s) have you considered?

Use a general-purpose compression mechanism instead. zstd's higher compression settings are almost able to reach WOFF2 file sizes, but not quite.

Contributor guide

Open the contributing guide

Research direction

Start at the FontLoader entry point and trace how existing TTF/OTF font files are loaded. Determine the decompression and platform support needed for .woff2 files, then verify that a Bevy application can load them successfully on web targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.