fschutt / rust-fontconfig

Pure-Rust rewrite of the Linux fontconfig library (no system dependencies) - using ttf-parser and allsorts
MIT License
39 stars 8 forks source link

Scope / plan? #4

Open dhardy opened 3 years ago

dhardy commented 3 years ago

The README claims this is "Pure-Rust rewrite of the Linux fontconfig library" and "Also works on Windows and macOS". But it's not fontconfig.

Fontconfig does quite a bit: not just locating font files, but matching fonts from generic or specific family names, with name alias rules, fallback fonts for non-latin glyphs, matching based on language, and even some configuration of rendering (not sure if that's still used today).

This library currently only enumerates font files, extracts some basic properties, and does basic matching (not even implementing CSS matching rules).

So, what is the planned scope? A more complete re-implementation of fontconfig including matching/aliases/fallbacks could be really useful.

fschutt commented 3 years ago

The scope for now is just to do basic matching, so that azul does not have to depend on fontconfig anymore for building. In the future maybe I can add support for all the mentioned features, but right now I'm just trying to get azul to work.

Sorry for the confusing name. font-db is maybe a better replacement for fontconfig. The scope is correct, eventually I want this to be a full replacement for fontconfig, but right now it's just a very basic approach.