linebender / runebender

A font editor written in Rust.
Apache License 2.0
765 stars 37 forks source link

Generate kerning tables for the Preview (VirtualFont) #242

Open xorgy opened 3 years ago

xorgy commented 3 years ago

A vital step toward having a kerning and metrics editor, is having the ability to display kerning in the preview.

xorgy commented 3 years ago

I think I am mostly finished with this.

xorgy commented 3 years ago

For whatever reason it slipped my mind that kern is unused with OpenType.

cmyr commented 3 years ago

@xorgy simon is currently working on a very interesting project that uses serde to generate opentype tables, which will be a huge improvement on rolling our own; check out fonttools-rs. I would imagine replacing all of our current table generation with this crate when it has matured a little bit more.

xorgy commented 3 years ago

I saw that, and i'm looking at it now. :+ )

xorgy commented 3 years ago

It has hhea right now, but seems it lacks cmap and hmtx as of yet (as you know, since you were looking at it an hour ago), but it's a good place to put stuff like this, if its structs are suitable. Not sure if serdes can really handle everything in this mess though; for example there are hard limits on some table and subtable sizes, and it's not entirely clear how to resolve that.

cmyr commented 3 years ago

I'm talking to simon about it, I think we'll have to get pretty deep into writing custom serializer/deserializer implementations, but my hunch is it will all be doable.