Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4191 closed patch (fixed)

OSD RTL languages patch

Reported by: thelinuxer@… Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

This patch corrects the viewing of OSD text for RTL languages. It uses fribidi lib.

This should work for Hebrew and Persian using the stable released fribidi library, just make sure you choose a font that supports these languages.

This patch will also test for fribidi version 0.22 and will compile if it exists with supporting visual representation. If it doesn't exist, it will ignore and compile without supporting it.

Attachments (3)

osd_rtl_support.patch (3.4 KB) - added by thelinuxer@… 12 years ago.
osd_rtl_support.2.patch (3.7 KB) - added by thelinuxer@… 12 years ago.
This is our final patch for OSD fribidi support. It solves the problem with linking to fribidi is not automatically set by the configure script. It also splits the code in two paths: If fribidi exists, the code will attempt to use Fribidi rtl conversion. If not, it will revert to the simple method that exists today in Mythtv (the ConvertFromRtl? method, which doesn't support complex languages like Arabic)
4191-v1.patch (5.4 KB) - added by danielk 12 years ago.
Reviewed patch

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by thelinuxer@…

Attachment: osd_rtl_support.patch added

Changed 12 years ago by thelinuxer@…

Attachment: osd_rtl_support.2.patch added

This is our final patch for OSD fribidi support. It solves the problem with linking to fribidi is not automatically set by the configure script. It also splits the code in two paths: If fribidi exists, the code will attempt to use Fribidi rtl conversion. If not, it will revert to the simple method that exists today in Mythtv (the ConvertFromRtl? method, which doesn't support complex languages like Arabic)

comment:1 Changed 12 years ago by danielk

Milestone: unknown0.21
Owner: changed from Isaac Richards to danielk

Changed 12 years ago by danielk

Attachment: 4191-v1.patch added

Reviewed patch

comment:2 Changed 12 years ago by danielk

Ahmed, can you look at the patch I just attached and make sure it worked. I mostly just removed some tabs, but I also added some locking for the QTextCodec, for thread safety, and rearranged things a bit wrt ConvertFromRtoL.

PS Can you also add something that disables this bit of code for Left-to-Right languages, where it is not needed?

comment:3 Changed 12 years ago by danielk

Milestone: 0.21unknown

comment:4 Changed 12 years ago by thelinuxer@…

I tested the revised patch and it works fine.

About the other part that disables this code for Left-to-Right languages, I think that if the user didn't compile with fribidi support so USING_FRIBIDI will not be defined and that code will not be executed at all.

comment:5 Changed 12 years ago by danielk

Resolution: fixed
Status: newclosed

(In [15030]) Fixes #4191. Applies patch from Ahmed Toulan @ OpenCraft? to render RtoL text with complex kerning correctly in OSD.

To enable this you must install the fribidi library and rerun ./configure, if fribidi is not installed ./configure will select the old RtoL conversion which results in uglier, but still readable, text for RtoL languages with complex text forms.

comment:6 Changed 12 years ago by danielk

(In [15041]) Refs #4191. Fixes fribidi library check from [15030], ./configure was checking the pkg-config version, not the fribidi version.

The fribidi code in [15030] requires fribidi2. (fribidi version 0.19+ in the fribidi2 cvs).

Note: See TracTickets for help on using tickets.