Page MenuHomePhabricator

Bug: Evas Text ellipsis could be placed wrongly in RTL text.
Closed, ResolvedPublic

Description

1. Ellipsis is placed to opposite side from elliptical text in RTL text.

  • 1st line: TEXT with ellipsis: 1.0 (wrong)
  • 2nd line: TEXTBLOCK with ellipsis: 1.0 (normal)

Evas Text ellipsized right side of text. But, it put ellipsis item to left side.
On the other hand, Evas Textblock ellipsized left side of text and put ellipsis item to left side.

2. Ellipsis can be placed middle of text with ellipsis: 1.0(or 0.0) in RTL text.

  • 1st line: TEXT with ellipsis: 1.0, font: BreezeSansArabic (wrong)
  • 2nd line: TEXTBLOCK with ellipsis: 1.0, font: BreezeSansArabic (normal)

BreezeSansArabic font does not have "(", ")" glyphs.
Because of missing glyphs from a font, Evas Text could make multiple text items.
In this case, Evas Text ellipsize wrong text item(Or wrong side of text item).

Details

Differential Revisions
Restricted Differential Revision
Commits
D3769 / rEFL36d086ec42fe: Evas text: fix RTL text ellipsis issues
id213sin created this task.Feb 16 2016, 3:27 AM


Here is BreezeSansArabic font file.
Please, put this to /usr/share/fonts/ (Or your default fonts folder).


Here is my test application.
It use test.edc file for Text, Textblock.
So, if you want to change font or some properties, please modify edc and run make.

Thanks for the details.
Just want to let you know that there are some related tasks (and patches iirc). I will mention those here so we won't repeat the same discussions.

Evas Texblock has also wrong case according text length.


1st line : TEXTBLOCK with ellipsis: 1.0, font: BreezeSansArabic (wrong)
2nd line : TEXTBLOCK with ellipsis: 1.0, font: BreezeSansArabic (normal)
When ")" is located at left end, then ellipsis is wrong.

@minudf, @herdsman
According to my test, ")... ARABIC" issue in Textblock is also reproduced only with specific font which does not have "(", ")" glyphs.
I guess there is a lack of RTL handling on multiple items on both of Text classes.
It is hard to find out how it should be fixed. :(

I found a solution for ")... ARABIC" problem in Evas Textblock.
I think it was not problem of RTL. It could be fixed with modifying text_pos of ellipsis item.
Anyway, I'll make a patch for this.

Evas text has other wrong case (it doesn't include "( )").


1st line : TEXT with ellipsis: 1.0 (wrong)
2nd line : TEXTBLOCK with ellipsis: 1.0 (normal)

Original text is "حدد نوع لوحة المفاتيح التي تستخدمها لإدخال النص".
So, it should start as "حدد نوع".

Hi,

I have attached sample code to reproduce above issue(Evas text has other wrong case (it doesn't include "( )").) mentioned by Mr. Minudf.

https://phab.enlightenment.org/F29786

@tasn , @herdsman I know you are busy, but can you please help us fixing this issue. This is very urgent issue of Tv product. Release is due on Monday.

command to compile:: gcc -o label_text label_text.c -g pkg-config --cflags --libs elementary

Thanks in advance.

id213sin triaged this task as High priority.Mar 4 2016, 7:11 PM
id213sin added a comment.EditedMar 4 2016, 8:44 PM

According to urgent request, I made a patch for this task.
for Evas text: D3769, for Evas textblock: D3716
Please, test it.

@minudf, @anand.km
Evas Text handle elliipsis differently from Evas Textblock.

ellipsis 0.0 means end of text on Evas Text == ellipsis 1.0 on Evas Textblock
(ellipsis 0.0 is default of TEXT part on Edje. So, you can see ellipsis at the end of text)

ellipsis 1.0 means start of text on Evas Text == ellipsis 0.0 on Evas Textblock.

It seems ridiculous. I don't know why.
But, please test it considering those differences.

herdsman added a revision: Restricted Differential Revision.Sep 1 2016, 12:34 AM