servo / pathfinder

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

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

Open pushqrdx opened 1 year ago

pushqrdx commented 1 year ago

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

s3bk commented 1 year 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 1 year 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 1 year 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.