Bug 318029 - Line spacing in KDE applications like kate for Persian language (and possibly other similiar languages) is too tight for the characters to be shown completely
Summary: Line spacing in KDE applications like kate for Persian language (and possibly...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: encoding (show other bugs)
Version: 3.10.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-08 12:27 UTC by Kete Tefid
Modified: 2016-09-08 23:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: KDE Frameworks 5.27
Sentry Crash Report:


Attachments
A file with Farsi characters. (51 bytes, text/plain)
2013-04-08 12:28 UTC, Kete Tefid
Details
The open source farsi fonts (324.68 KB, application/x-zip-compressed)
2013-04-08 14:36 UTC, Kete Tefid
Details
A screenshot showing the problem (53.48 KB, image/jpeg)
2013-12-04 14:45 UTC, Kete Tefid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kete Tefid 2013-04-08 12:27:09 UTC
As the title speaks, line spacing in kate and in all of kde applications (like konsole) needs to be larger so that the characters of Persian (Farsi) and probably other similiar languages (like Arabic) will be shown completely and correctly. I have attached a text file whose content is its name. While the filename is shown properly in dolphin, the same text cannot be shown correctly in kate or when it is accessed through konsole. The encoding is set to UTF-8.

Reproducible: Always
Comment 1 Kete Tefid 2013-04-08 12:28:28 UTC
Created attachment 78725 [details]
A file with Farsi characters.
Comment 2 Kete Tefid 2013-04-08 12:32:46 UTC
Sorry that I could not find the appropriate product and component for this bug, thus, one should change them to correct values. Definitely it is not just for kate. I happens in all of kde applications.
Comment 3 Dominik Haumann 2013-04-08 12:42:19 UTC
What font are you using?
What happens if you increase/decrease the font size?
Can you check different fonts?
Comment 4 Kete Tefid 2013-04-08 14:36:00 UTC
Created attachment 78731 [details]
The open source farsi fonts
Comment 5 Kete Tefid 2013-04-08 14:41:06 UTC
Thank you for your quick reply. I am using the open source farsi fonts attached.
If I increase the font size or decrease it, it just scales the text up and down but does not affect the problem. It seems that there is an imaginary line just below the text which cuts it and prevents the character from being shown properly.
I have tested all the fonts and the situation is more or less the same. Although with somehow the problem is more noticeable and with some less.
I have set to use the fonts through /etc/fonts/local.conf:
<?xml version="1.0"?>
w<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts.conf file to configure system font access -->
<fontconfig>
        <!--  Enable sub-pixel rendering
        <match target="font">
                <test qual="all" name="rgba">
                        <const>unknown</const>
                </test>
                <edit name="rgba" mode="assign"><const>rgb</const></edit>
        </match>
         -->

        <alias>
                <family>serif</family>
                <prefer>
                        <family>Bitstream Vera Serif</family>
                        <family>Homa</family>
                </prefer>
        </alias>
        <alias>
                <family>sans-serif</family>
                <prefer>
                        <family>Bitstream Vera Sans</family>
                        <family>Homa</family>
                </prefer>
        </alias>
        <alias>
                <family>monospace</family>
                <prefer>
                        <family>Bitstream Vera Sans Mono</family>
                        <family>Homa</family>
                </prefer>
        </alias>
</fontconfig>
For example, with the font Homa, the situation is much worse.
Comment 6 Kete Tefid 2013-04-08 16:10:26 UTC
If I don't use the local.conf file, by default it uses a font which has the least problems but is super ugly.
In the file local.conf above, there is an error in the second line : "w" should not be there.
Comment 7 Kete Tefid 2013-04-09 17:18:09 UTC
Also all taskbar entries with Persian names are not shown properly. Somehow they are shown like the way in a text file. The tag of a taskbar entry needs to be shown in the center, but It is too much near the bottom limit.
Comment 8 Kete Tefid 2013-12-04 14:45:23 UTC
Created attachment 83923 [details]
A screenshot showing the problem

Hello,
I have attached a screenshot showing the problem.
As soon as I change the layouts, not only the Persian/Arabic characters are shown lower than needed, but also they change the way the English characters are shown. 
The problem is clear in Konsole and in the taskbar (The place the windows are minimized).
Comment 9 Christoph Cullmann 2014-07-21 20:00:23 UTC
Not sure how to fix that in KDE 4.x, but for KF5 branch, it just works.

I can fully read the

سلام به همه آدمهای خوب دنیا

line
Comment 10 Kete Tefid 2014-07-25 06:51:58 UTC
(In reply to Christoph Cullmann from comment #9)
> Not sure how to fix that in KDE 4.x, but for KF5 branch, it just works.
> 
> I can fully read the
> 
> سلام به همه آدمهای خوب دنیا
> 
> line

Thank you very much for the good news.

I will try to test the new framework and manage to install it. 
Just to check again, did you print the the entry in Konsole or put it in a mixed languge Kate document and the text was not cut?

Thank you again.
Comment 11 Hamidreza Jafari 2016-09-08 20:37:26 UTC
Hi,

The problem is not resolved in Kubuntu 16.04. Still part of Persian text is cut. That's in Kate and Terminal. I checked with a GTK editor and there was no problem, Persian text there displayed well.

Hamid
Comment 12 Christoph Cullmann 2016-09-08 20:46:33 UTC
We just did improve further with that, look at bug 335079
Comment 13 Hamidreza Jafari 2016-09-08 21:57:59 UTC
Thanks. When is Kate updated then? Will it appear in system update?
Comment 14 Christoph Cullmann 2016-09-08 22:02:52 UTC
It will appear with KDE frameworks 5.27.