Complex text layout patch
ClosedPublic

Authored by anooda on Feb 17 2016, 10:49 AM.

Details

Reviewers
rempt
Summary

I tried to improve Krita to support complex text layout such as Arabic. Krita uses QPainterPath to draw text in the path by using addText method . Moreover, Add text method draws character by character on the path , so it bugs complex text layout such Arabic language . I have used QTextLayout to use QGlyphRun . In addition, QGlyphRun returns glyphIndexes and glyph positions. There is a function in QRawFont ( pathForGlyph( ) ) which can add glyph in a path.
I have attached a patch that can support complex text layout, but there is a problem with cursor position.
I don't know if you want me to complete working on it or not!, as I know krita developers will rewrite the text tools again!

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
anooda updated this revision to Diff 2333.Feb 17 2016, 10:49 AM
anooda retitled this revision from to Complex text layout patch.
anooda updated this object.
anooda edited the test plan for this revision. (Show Details)
anooda set the repository for this revision to R37 Krita.

This is a screenshot shows arabic and english text.

woltherav added a subscriber: woltherav.

Boudewijn has said before his holiday that anything text-related you do is going to be useful for us in the long haul(especially because we aren't as familiar with Arabic), so go crazy, just motivate what you do so we can follow along. :)

rempt edited edge metadata.Mar 4 2016, 11:54 AM

This is the same patch as on bugzilla, right?

rempt accepted this revision.Mar 14 2016, 12:05 PM
rempt edited edge metadata.

This was already pushed.

This revision is now accepted and ready to land.Mar 14 2016, 12:05 PM
aacid closed this revision.Feb 26 2017, 11:10 PM