[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
minibidi bug
- To: developer at arabeyes dot org
- Subject: minibidi bug
- From: Behdad Esfahbod <behdad at cs dot toronto dot edu>
- Date: Sat, 28 May 2005 18:11:24 -0400 (EDT)
Quoting fribidi.c:
/* There are a few little points in pushing into and poping from the status
stack:
1. when the embedding level is not valid (more than
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61), you must reject it, and not to push
into the stack, but when you see a PDF, you must find the matching code,
and if it was pushed in the stack, pop it, it means you must pop if and
only if you have pushed the matching code, the over_pushed var counts the
number of rejected codes so far.
2. there's a more confusing point too, when the embedding level is exactly
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1=60, an LRO or LRE is rejected
because the new level would be FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL+1=62, that
is invalid; but an RLO or RLE is accepted because the new level is
FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61, that is valid, so the rejected codes
may be not continuous in the logical order, in fact there are at most two
continuous intervals of codes, with an RLO or RLE between them. To support
this case, the first_interval var counts the number of rejected codes in
the first interval, when it is 0, means that there is only one interval.
*/
--behdad
http://behdad.org/