Conversation
|
Thanks for this proposal. However I am about to merge a rather important change to the Kdenlive titler to allow rich text formatting, allowing to have different font styles in each element: It would be great to rebase this work on top of this change. @klg90 I would be interested to also have your input about how to integrate this into your changes. |
037e7e4 to
24f8995
Compare
|
Thanks @j-b-m ! I have successfully rebased this PR on top of @klg90's rich text branch ( Both rich text formatting and standard title clips in MLT now preserve full HarfBuzz complex OpenType script shaping (Sinhala Rakaransaya ligatures, Indic conjuncts, and Arabic cursive joining) with |
Nice, thanks for rebasing it on top of my branch! Glad it's working with both rich text and standard titles. I'll take a look at the changes and see if I notice anything with the integration. |
klg90
left a comment
There was a problem hiding this comment.
Thanks for rebasing this on top of my branch. I looked through the diff and the shaping approach looks useful, but I found a few regressions caused by the new PlainTextItem rendering path.
The main ones I found:
- gradients get reduced to a single color because the new fill path uses m_brush.color() instead of preserving the full brush
- outlines no longer seem to be rendered as a true glyph stroke with the new QTextLayout::draw() pass
- the existing custom tab width handling is removed, so saved tab spacing is no longer respected
- shadows are built from a separate shaped path, so alignment/position can diverge from the visible text
I also noticed the new image cache starts at (0, 0) with no ink-bounds padding, which can clip glyphs that extend left of the logical origin, like some italic characters.
I tested these as focused Qt rendering cases rather than a full MLT/Kdenlive integration run. I think the shaping fix itself is worth keeping, but it would be good to preserve the existing gradient, outline, tab and shadow behavior while using the shaped layout data.
Refactor PlainTextItem to populate QPainterPath directly using HarfBuzz-shaped vector glyph runs via appendShapedText(). This preserves HarfBuzz complex OpenType script shaping (Sinhala Rakaransaya, Indic conjuncts, and Arabic cursive joining) while fully preserving: - Multi-color linear/radial gradients (QBrush) - True stroke path outlines (painter->strokePath) - Custom tab width calculations (m_tabWidth) - Aligned drop shadow path geometry - Italic glyph ink bounds without QImage clipping
24f8995 to
3f18566
Compare
Thanks @klg90 for the detailed feedback and test cases! You were completely right. I have updated the PR to remove the intermediate This resolves all 5 reported regressions:
Complex script OpenType shaping (Sinhala Rakaransaya ligatures |


Summary
qt: Preserve complex script ligatures and OpenType shaping in
kdenlivetitleproducer.Related Bug Report
Verification & Language Testing
clang-format.