justvanrossum / drawbot-skia

A cross-platform subset of the DrawBot drawing API, using Skia
Apache License 2.0
77 stars 8 forks source link

Use HarfBuzz for text shaping #4

Closed justvanrossum closed 4 years ago

khaledhosny commented 4 years ago

Skia seems to have https://github.com/google/skia/tree/master/modules/skshaper and https://github.com/google/skia/tree/master/modules/skparagraph, not sure if you have seen them or if they are up to the job.

justvanrossum commented 4 years ago

Oh, thanks, I had not seen that. They don't seem to be covered by skia-python yet, though.

justvanrossum commented 4 years ago

My idea for progress here is:

  1. implement single line, single style text(), FontGoggles-style
  2. implement single line, multi style text()
  3. figure out how to do paragraph typesetting for textBox(), either through existing code (if Skia's is any good, then that would be the first choice) or through reinventing wheels if absolutely necessary.