servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.64k stars 207 forks source link

Can pathfinder be used as a drop-in replacement for freetype #522

Open pushqrdx opened 2 years ago

pushqrdx commented 2 years ago

I was wondering whether it's possible to use pathfinder as my default font rasterizer on Linux in place of freetype

s3bk commented 2 years ago

Possible yes, but how should it be replaced? If you have to replicate the entir C-api, it will require a lot of work and introduces all C problems again.

pushqrdx commented 2 years ago

@s3bk ah, I thought there might be a minimal set of functionality that most modern applications use out off of freetype that can be exposed via some shim to use pathfinder instead. Idk the idea of benefitting from all the pathfinder features on Linux seems very interesting.

By the way does recent versions of Firefox use pathfinder by default now?

s3bk commented 2 years ago

By the way does recent versions of Firefox use pathfinder by default now? I don't think so. I think they still use Skia.

The problem that I see is that freetype has a very "unique" api. And I am not sure anyone would want to replicate that.