[Koha-bugs] [Bug 12068] label-create-pdf.pl Add support for RTL languages

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Aug 14 17:31:20 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12068

Karam Qubsi <karamqubsi at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #30775|0                           |1
        is obsolete|                            |

--- Comment #9 from Karam Qubsi <karamqubsi at gmail.com> ---
Created attachment 30792
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30792&action=edit
[SIGNED-OFF]Bug 12068 - label-create-pdf.pl Add support for RTL language

On top of Bug 8375

If you print a label using arabic/hebrew script,
letters are printed in logical direction, from left
to right, giving a mangled result

This patch will try to fix those cases adding a new
perl dependency, Text::Bidi, and using the automagic
feature if it's log2vis() function to rearrange chars
based on detected text 'direction'

To test:
1. Install Text::Bidi package
(apt-get install libtext-bidi-perl)

2. Try a batch, using Helvetica, with a mix of
ltr and rtl (arabic/hebrew) titles, chars are good,
but direction is bad

NOTE: I suggest changing the mapping for 'HO' font
on koha-conf.xml, from DejaVuSans-Oblique.ttf to
DejaVuSans.ttf to view 'title' chars

3. Apply the patch

4. Try again, now the result is good

Formerly a followup of Bug 8375, look sample pics
on that Bug.
Rebased following changes on Bug 8375

Note: Arabic titles will not be displayed, because
current code selects Oblique variant (unless you
change mapping as suggested on 2. )
Hebrew looks good.

Rebased and move use of new dependency to Labels.pm

Rebased on master

Signed-off-by: Karam Qubsi <karamqubsi at gmail.com>


this patch works as described : 

the fonts in koha-conf.xml are modified as the following 
    <font type="H"  >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf</font>
    <font type="HO" >/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf</font>

 Hlvetica oblique is mapped to the same file as helvetica

I used a layout with "Helvetica" font 
and with right justification, 7 font size
I tested it with an Arabic items
the results exported is very good for me as an Arabic reader 

Thank you Bernardo .

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list