Implements basic line-breaking and text shaping (take 2). This should allow easier inclusion of BIDI processing and proper shaping.
Also implements position look-up (now much simpler) and correct highlighting of multiple lines (two options).
Performance is just slow enough to be perceptible (unlike Qt). I haven't investigated, but I suspect the issue is drawing (which could benefit from caching the output of positioned_glyphs). But it's too soon to worry about optimisation, and I don't think there's any issue with scaling provided we add a variant of positioned_glyphs with view-bounds later.
Feature-wise, this already has a couple of advantages over glyph_brush_layout:
better support for position look-up (coord → index and index → coord)
generation of rectangles required to highlight a range of text (two variants)
Implements basic line-breaking and text shaping (take 2). This should allow easier inclusion of BIDI processing and proper shaping.
Also implements position look-up (now much simpler) and correct highlighting of multiple lines (two options).
Performance is just slow enough to be perceptible (unlike Qt). I haven't investigated, but I suspect the issue is drawing (which could benefit from caching the output of
positioned_glyphs
). But it's too soon to worry about optimisation, and I don't think there's any issue with scaling provided we add a variant ofpositioned_glyphs
with view-bounds later.Feature-wise, this already has a couple of advantages over
glyph_brush_layout
: