Revision 9fc2d7c...

Go back to digest for 3rd March 2013

Optimization in Educational

Sebastian Gottfried committed changes in [ktouch] /:

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.




FIXED-IN: 4.11

File Changes

Added 2 files
  • /declarativeitems
  •   src/lessonpainter.cpp
  •   src/lessonpainter.h
Deleted 3 files
  •   src/declarativeitems/lessonfontsizecalculater.cpp
  •   src/declarativeitems/lessonfontsizecalculater.h
  •   src/qml/TrainingLine.qml
Modified 8 files
  •   src/application.cpp
  •   src/CMakeLists.txt
  •   src/declarativeitems/traininglinecore.cpp
  •   src/declarativeitems/traininglinecore.h
  •   src/qml/CMakeLists.txt
  •   src/qml/LessonPreview.qml
  •   src/qml/TrainingScreen.qml
  •   src/qml/TrainingWidget.qml
13 files changed in total