diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/bidi.h | 7 | ||||
-rw-r--r-- | include/mupdf/fitz/font.h | 3 | ||||
-rw-r--r-- | include/mupdf/html.h | 18 |
3 files changed, 23 insertions, 5 deletions
diff --git a/include/mupdf/fitz/bidi.h b/include/mupdf/fitz/bidi.h index dfa439f3..8428ffc1 100644 --- a/include/mupdf/fitz/bidi.h +++ b/include/mupdf/fitz/bidi.h @@ -10,8 +10,6 @@ * Processes Unicode text by arranging the characters into an order suitable * for display. E.g. Hebrew text will be arranged from right-to-left and * any English within the text will remain in the left-to-right order. - * Characters such as parenthesis will be substituted for their mirrored - * equivalents if they are part of text which must be reversed. * * This is an implementation of the Unicode Bidirectional Algorithm which * can be found here: http://www.unicode.org/reports/tr9/ and is based @@ -55,14 +53,15 @@ enum * as right-to-left * @param char_r2l true if characters within block should be laid out * as right-to-left - * @param mirror The mirror code of the fragment if it exists + * @param script the script in use for this fragment (other than common + * or inherited) * @param arg data from caller of Bidi_fragmentText */ typedef void (fz_bidi_fragment_callback)(const uint32_t *fragment, size_t fragmentLen, int block_r2l, int char_r2l, - uint32_t mirror, + int script, void *arg); /** diff --git a/include/mupdf/fitz/font.h b/include/mupdf/fitz/font.h index 47866f9e..0de3e00e 100644 --- a/include/mupdf/fitz/font.h +++ b/include/mupdf/fitz/font.h @@ -68,6 +68,9 @@ struct fz_font_s /* cached encoding lookup */ uint16_t *encoding_cache[256]; + + /* Shaping information */ + void *shaper; }; /* common CJK font collections */ diff --git a/include/mupdf/html.h b/include/mupdf/html.h index 4969e15c..c734ea0d 100644 --- a/include/mupdf/html.h +++ b/include/mupdf/html.h @@ -221,11 +221,27 @@ enum */ struct fz_html_flow_s { + /* What type of node */ unsigned int type : 2; + + /* Whether this should expand during justification */ unsigned int expand : 1; + + /* Whether the chars should be laid out r2l or l2r */ unsigned int char_r2l : 1; + + /* Whether this block should stack with its neighbours r2l or l2r */ unsigned int block_r2l : 1; - unsigned int mirror : 1; + + /* Whether the markup specifies a given direction. */ + unsigned int markup_r2l : 2; + + /* Whether the markup specifies a given language. */ + unsigned int markup_lang : 8; + + /* The script detected by the bidi code. */ + unsigned int script : 8; + float x, y, w, h, em; fz_css_style *style; union { |