godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine

Home Page:https://godotengine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add HarfBuzz for text shaping (complex scripts, font ligatures)

bruvzg opened this issue · comments

Change DynamicFont to use HarfBuzz (MIT license) to handle:

  1. Context-sensitive shaping and ligatures for complex scripts (Arabic, Devanagari, Thai etc.);
  2. Programming ligatures with fonts like Iosevka & Fira Code in script editor.

fonts

Related: #3081

Would be ideal to just adapt the relevant code instead of using a pretty big library for it

This is far from finished and a hell of a mess, but here's early in-progress screenshot (bidi display, language specific shaping, OT typographic features).

Test build:
test

3.0 alpha 1:
test3a

I'll probably make WIP PR next week.