Bug 315511

Summary: Arabic not shown correctly in 2.0
Product: [Applications] ktouch Reporter: Fahad Al-Saidi <Fahad.alsaidi>
Component: generalAssignee: Sebastian Gottfried <sebastian.gottfried>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.0.0   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.11
Sentry Crash Report:
Attachments: Arabic broken in Ktouch

Description Fahad Al-Saidi 2013-02-20 12:40:16 UTC
In arabic training lessons the text not shown from left from right . Please see the attachment.

Reproducible: Always
Comment 1 Fahad Al-Saidi 2013-02-20 12:41:12 UTC
Created attachment 77458 [details]
Arabic broken in Ktouch
Comment 2 Sebastian Gottfried 2013-03-05 22:34:24 UTC
Git commit 9fc2d7cbce742dff7760fb0ad3ca363d4446a3f3 by Sebastian Gottfried.
Committed on 26/02/2013 at 11:49.
Pushed by gottfried into branch 'master'.

rewrite lesson text rendering

Previously I have employed a lot of individual Text elements to
assemble the lesson trainer. This worked well for languages with
a Latin alphabet but was insufficient for pretty much anything else
since it was unable to render typographic ligatures and had no support
for right-to-left training.

The new implementation fixes all these issues with a new taylor-made
declarative item encapsulating a QTextDocument instance to do
the lesson text rendering.

As a nice side effect the text rendering looks much better now since
the letter-spacing is now correct. Previously I had no control over
the font hinting settings and the results of hintend and scaled text
were hideous. Therefore the training text is now rendered only with
vertical hinting.

As a bonus the new component is also used to render the lesson previews
on the home screen. That way the appearance there and in the training
screen are coherent and the previews also benefit from the improved
text rendering quality.
Related: bug 128268
FIXED-IN: 4.11

M  +1    -1    src/CMakeLists.txt
M  +2    -2    src/application.cpp
D  +0    -111  src/declarativeitems/lessonfontsizecalculater.cpp
D  +0    -56   src/declarativeitems/lessonfontsizecalculater.h
A  +348  -0    src/declarativeitems/lessonpainter.cpp     [License: GPL (v2+)]
A  +88   -0    src/declarativeitems/lessonpainter.h     [License: GPL (v2+)]
M  +14   -5    src/declarativeitems/traininglinecore.cpp
M  +3    -1    src/declarativeitems/traininglinecore.h
M  +0    -1    src/qml/CMakeLists.txt
M  +14   -45   src/qml/LessonPreview.qml
D  +0    -236  src/qml/TrainingLine.qml
M  +4    -0    src/qml/TrainingScreen.qml
M  +134  -130  src/qml/TrainingWidget.qml

http://commits.kde.org/ktouch/9fc2d7cbce742dff7760fb0ad3ca363d4446a3f3
Comment 3 Sebastian Gottfried 2013-03-05 22:34:24 UTC
Git commit 9fc2d7cbce742dff7760fb0ad3ca363d4446a3f3 by Sebastian Gottfried.
Committed on 26/02/2013 at 11:49.
Pushed by gottfried into branch 'master'.

rewrite lesson text rendering

Previously I have employed a lot of individual Text elements to
assemble the lesson trainer. This worked well for languages with
a Latin alphabet but was insufficient for pretty much anything else
since it was unable to render typographic ligatures and had no support
for right-to-left training.

The new implementation fixes all these issues with a new taylor-made
declarative item encapsulating a QTextDocument instance to do
the lesson text rendering.

As a nice side effect the text rendering looks much better now since
the letter-spacing is now correct. Previously I had no control over
the font hinting settings and the results of hintend and scaled text
were hideous. Therefore the training text is now rendered only with
vertical hinting.

As a bonus the new component is also used to render the lesson previews
on the home screen. That way the appearance there and in the training
screen are coherent and the previews also benefit from the improved
text rendering quality.
Related: bug 128268
FIXED-IN: 4.11

M  +1    -1    src/CMakeLists.txt
M  +2    -2    src/application.cpp
D  +0    -111  src/declarativeitems/lessonfontsizecalculater.cpp
D  +0    -56   src/declarativeitems/lessonfontsizecalculater.h
A  +348  -0    src/declarativeitems/lessonpainter.cpp     [License: GPL (v2+)]
A  +88   -0    src/declarativeitems/lessonpainter.h     [License: GPL (v2+)]
M  +14   -5    src/declarativeitems/traininglinecore.cpp
M  +3    -1    src/declarativeitems/traininglinecore.h
M  +0    -1    src/qml/CMakeLists.txt
M  +14   -45   src/qml/LessonPreview.qml
D  +0    -236  src/qml/TrainingLine.qml
M  +4    -0    src/qml/TrainingScreen.qml
M  +134  -130  src/qml/TrainingWidget.qml

http://commits.kde.org/ktouch/9fc2d7cbce742dff7760fb0ad3ca363d4446a3f3