[FriBidi] log2vis() misbehaving with Arabic text?
Behdad Esfahbod
behdad at behdad.org
Tue Oct 28 01:45:45 PDT 2014
On 14-10-27 10:47 AM, Philip Semanchuk wrote:
> On Mon, Oct 27, 2014 at 1:26 PM, Behdad Esfahbod <behdad at behdad.org> wrote:
>> On 14-10-27 08:39 AM, Philip Semanchuk wrote:
>>> I need to play around with it a little, though. For instance, I saw
>>> one case where the PDF rendered an unprintable character where
>>> log2vis() had inserted a ZWNBSP (0xfeff) into a string. Technically a
>>> ZWNBSP should be harmless but...
>>
>> Right. FriBidi inserts U+FEFF when it needs to delete a character slot. The
>> FriBidi user should either remove those from the stream or make sure they
>> render to nothing. That sounds like a ReportLab bug.
>
> Yes, one could also argue that it's my PDF viewer that's at fault.
Not really. The PDF viewer gets exact instructions about what to show...
It's the PDF generator that decides.
> This is one of the things I need to experiment with.
>
> Removing ZWNBSP is easy enough. Is any other postprocessing needed
> after calling log2vis()?
Well, there are more characters that need to be hidden. Check
fribidi_remove_bidi_marks(). By mistake, that function is deprecated, but I
don't have a replacement for it if I recall correctly.
Check with a character like U+200C. It shouldn't render to a box.
> Thanks
> Philip
> _______________________________________________
> fribidi mailing list
> fribidi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/fribidi
>
--
behdad
http://behdad.org/
More information about the fribidi
mailing list