[FriBidi] "fribidi_remove_special_chars" function?

Behdad Esfahbod behdad at behdad.org
Wed Aug 14 10:49:33 PDT 2013


On 13-08-13 07:27 PM, Evgeny Grin wrote:
> 
> 14.08.2013, 02:26, "Behdad Esfahbod" <behdad at behdad.org>:
>> On 13-08-13 04:24 PM, Evgeny Grin wrote:
>>>  I'm going to implement it in the following way:
>>>   * convert to UTF-32
>>>   * call fribidi_get_bidi_types
>>>   * call fribidi_get_par_embedding_levels
>>>   * call fribidi_get_joining_types
>>>   * call fribidi_join_arabic
>>>   * call fribidi_shape
>>>   * split result into lines, for each line call fribidi_reorder_line, combine resulting lines back to paragraph
>>
>> You need fribidi_reorder_line() here.
>> Check out fribidi_log2vis() implementation.
> 
> fribidi_log2vis works only with single lines. So I'm going here to: * split paragraph into single lines, * process each line with fribidi_reorder_line(), * combine result back to paragraph.
> Is it right?

Right.


> I suppose that "off" parameter of fribidi_reorder_line() is equal to size of all previous lines (with line breaks) in paragraph. Is it correct?

Almost.  There's no line breaks involved.  It's the start index of the line in
the original paragraph text.


>>>   * call fribidi_remove_bidi_marks
>>>   * convert result to needed encoding (UTF-8 in my case)
>>>   * use result for display
>>>  Correct?
> Besides minors, is it right?

Humm?  Yes, this should give you good-enough support for Arabic and Hebrew.


>>>  Is it possible to detect on early stage ability to skip arabic joining and shaping?
>> No.  I suggest you don't worry about performance.  It wouldn't make any
>> measurable difference.
> Nice! Thanks.
> 
> 
> I was trying to find any example with fribidi and multiline paragraphs, but without any success. Do you know any?

I don't.

> Best wishes,
> Evgeny
> 

-- 
behdad
http://behdad.org/


More information about the fribidi mailing list