Bug 128268 - Hebrew lectures do not load
Summary: Hebrew lectures do not load
Alias: None
Product: ktouch
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Haavard Froeiland
Depends on:
Reported: 2006-05-29 20:55 UTC by Yitz Gale
Modified: 2013-03-05 22:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11

Edited english.ktouch.xml (3.91 KB, application/octet-stream)
2006-07-01 23:28 UTC, Yitz Gale
From scratch in text editor (218 bytes, application/octet-stream)
2006-07-01 23:30 UTC, Yitz Gale
Using "Edit lecture" in KTouch (255 bytes, application/octet-stream)
2006-07-01 23:31 UTC, Yitz Gale

Note You need to log in before you can comment on or make changes to this bug.
Description Yitz Gale 2006-05-29 20:55:57 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

The KDE problems with RTL languages, though not totally
solved, are much improved. So the related KTouch problems
as reported in #61265 and others are not so bad now.
I have evidence - see below - that KTouch would now
be at least somewhat usable in Hebrew (and probably
other RTL languages) if it were possible
to load lectures containing Hebrew text.

But it is not possible to load lectures containing
Hebrew text (using 1.5 under KDE 3.5.2). I just get
the text "No training lecture loaded.<CR>".
When I try to edit a lecture containing Hebrew
letters, KTouch says "Could not open the lecture file,
creating a new one instead."

If I create a new lecture, enter Hebrew text, and
save, the resulting lecture file looks fine.

The interesting thing is: if I run KTouch in a
Hebrew locale, the the message "No training lecture
loaded.<CR>" is translated into Hebrew. And
that text seems to work fine for typing practice
in Hebrew. So I think that if KTouch would allow
Hebrew to be loaded from a lecture file, it would
be usable.

Comment 1 Diego Iastrubni 2006-07-01 15:04:50 UTC

Can you attach a sample training file? I will try to reproduce at least.
Comment 2 Yitz Gale 2006-07-01 23:28:56 UTC
Created attachment 16845 [details]
Edited english.ktouch.xml
Comment 3 Yitz Gale 2006-07-01 23:30:13 UTC
Created attachment 16846 [details]
From scratch in text editor
Comment 4 Yitz Gale 2006-07-01 23:31:48 UTC
Created attachment 16847 [details]
Using "Edit lecture" in KTouch
Comment 5 Yitz Gale 2006-07-01 23:47:19 UTC
OK, I attached three examples.
I attached them as binary files, to make
sure that the Hebrew characters do not
get munged by whatever you are running
locally; sorry for any inconvenience.

  I modified english.ktouch.xml as follows:
  I removed all but the first level, changed
  the letters 'f' and 'j' to Hebrew alef and
  bet, suggested a font (from the Culmus
  font package), and changed the comments.

  I created a very simple lesson file from
  scratch in a text editor.

  I created a lesson containing Hebrew letters
  using the built-in lesson editor in KTouch.
  Hmm... When saving, all Hebrew letters became
  question marks in the resulting file.
Comment 6 Anne-Marie Mahfouf 2006-11-25 11:53:57 UTC
This will be fixed for KDE4, I confirm the bug.
Comment 7 Anne-Marie Mahfouf 2007-12-12 22:11:29 UTC
cuco and Yitz, can you retry with KTouch from KDE 4 please?
I tested the sample hebrew lecture and it is loaded now. I did not test RTL though in KTouch.
If you could point any remaining problem so I can fix it for 4.0, that would be very nice. Thanks in advance, 
Comment 8 Diego Iastrubni 2007-12-13 21:50:21 UTC
I almost fixed this issue in revision 748195, but unfotunately I am unable to close this bug. Anyway, we just need to fix a small issue with the text direction painting for the student text and this bug can be closed.
Comment 9 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 315511, bug 315511
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