gpui: Further fix extraction of font runs from text runs (#43856)
Mikko Perttunen
created
After #39928, if a font's weight changes between text runs without other
decoration changing, the earlier weight continues to be used for the
subsequent run(s).
PR #40840 fixes this in shape_text, but similar code exists also in
layout_text. The latter is used for text in the editor view itself, so
the issue continues to appear when using a highlighting theme with
varied font weights.
Fix the issue by applying the same fix in layout_text.
Closes #42297
Release Notes:
- Fixed incorrect font weights in editor view when using a highlighting
theme with varying font weights