summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/font.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-01-29 14:10:53 +0000
committerRobin Watts <robin.watts@artifex.com>2016-02-04 13:21:11 +0000
commitd96bd69b94c12906473a4721c2c2dc5941923253 (patch)
tree6101971a4f96dbb5a6c4d189e1dd8ae5cf62cbcf /include/mupdf/fitz/font.h
parent5d840271f62c5a51bb83d561181de860086bb6be (diff)
downloadmupdf-d96bd69b94c12906473a4721c2c2dc5941923253.tar.xz
Make HTML layout use harfbuzz for shaping.
fz_fonts gain a 'shaper' field that will be filled in as required. Use a void * rather than an hb_font_t to avoid polluting top level include space. Harfbuff handles mirroring for us, so lose the 'mirror' fields. This simplifies our wrappers around the 'standard' bidi code in that we don't need to split fragments upon mirroring. We do need to split our fragments at script changes though as harfbuzz only operates on a single font at a time. Update the html flow structure so that each flow node contains details of the the direction specified for it in the markup, the language specified for it in the markup and the script detected by the bidi code. Get the bidi code to pass out the script for each fragment as part of the callback and populate that field in the node. Ensure that we pass in the markup direction to the bidi splitting code as the 'base' direction. When feeding the bidi code, rather than feeding it paragraphs at a time, break those paragraphs if different parts of them have different marked up directions.
Diffstat (limited to 'include/mupdf/fitz/font.h')
-rw-r--r--include/mupdf/fitz/font.h3
1 files changed, 3 insertions, 0 deletions
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 */