Hebrew search in PDFs is backwards?

Hebrew search in PDFs is backwards?

Gadi Cohen dragon at wastelands.net
Mon Jan 18 18:02:06 IST 2010


I'm a big fan of Fribidi... I wish it had been around when I added
Hebrew support to something years ago, and I've made extensive use of
the PHP wrapper for it.


It crossed my mind, but by relying on just the native qt4 and pango
stuff I was hoping to avoid extra dependencies and have a short and
sweet patch that would be easily accepted and used by default.


I'm scared that if I go the fribidi route, it will remain a compile time
option disabled by default -- whereas I'd prefer to have something that
is available out the box in any modern distro.  If someone can fault my
reasoning or suggest an alternative, please do!  I'd love to use fribidi
if it's feasible.


Thanks

Gadi


Dov Grobgeld wrote:

> You can easily do it with fribidi through the fribidi_log2vis()
> function. fribidi is wrapped by pango, but it does not export its API.
> It does export pango_log2vis_get_embedding_levels() but you'll have to
> work a bit more to use this function.
>
> Regards,
> Dov
>
> On Mon, Jan 18, 2010 at 16:28, Gadi Cohen <dragon at wastelands.net
> <mailto:dragon at wastelands.net>> wrote:
>
>     Matitiahu Allouche wrote:
>
>     > PDF's objective is to reflect the exact appearance of text.  For
>     > Hebrew, it means that the text is stored in visual order.  If
>     your PDF
>     > viewer accepts user input in logical order (which is the case in
>     > Windows and Linux), it should transform search arguments (captured
>     > from a user dialog) from logical to visual order before
>     performing the
>     > search.
>     Thanks, that was very helpful!
>
>     I'm now trying to implement this in Okular (instead of studying for my
>     exam, bad!).  I've set up a KDE4 development environment, but have no
>     prior experience with KDE or Qt at all.
>
>     I've searched the 'net for anything relevant, and I see in older
>     versions of Qt there were functions like QString::visual() and
>     QHebrewCodec, but nothing like that exists in the latest version
>     (4.6).
>     Do you (or does anyone) know how to convert a string from visual to
>     logical in qt4?
>
>     Or for reference purposes, do you or does anyone know offhand how one
>     would do this with GNOME / Pango?  (Evince is next, although with any
>     luck I won't look at any of this again until after exams).
>
>     Thanks!
>
>     Gadi
>
>     P.S. Anyone else wondering if all this hail will crack their
>     windows? :)
>
>     --
>     Gadi Cohen aka Kinslayer <dragon at wastelands.net
>     <mailto:dragon at wastelands.net>> www.wastelands.net
>     <http://www.wastelands.net>
>     Freelance admin/coding/design HABONIM DROR linux/fantasy enthusiast
>     KeyID 0x93F26EF5: 256A 1FC7 AA2B 6A8F 1D9B 6A5A 4403 F34B 93F2 6EF5
>
>
>     _______________________________________________
>     Linux-il mailing list
>     Linux-il at cs.huji.ac.il <mailto:Linux-il at cs.huji.ac.il>
>     http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>


-- 
Gadi Cohen aka Kinslayer <dragon at wastelands.net> www.wastelands.net
Freelance admin/coding/design HABONIM DROR linux/fantasy enthusiast
KeyID 0x93F26EF5: 256A 1FC7 AA2B 6A8F 1D9B 6A5A 4403 F34B 93F2 6EF5




More information about the Linux-il mailing list