diff options
author | Eli Zaretskii <eliz@gnu.org> | 2018-12-29 16:35:09 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2018-12-29 16:35:09 +0200 |
commit | 48776b70115edf3775df19d80f734048dadff198 (patch) | |
tree | 10a7e72a45bbbdf8dbfed4afce59fc9a5b975110 /lisp/language/hebrew.el | |
parent | 1a80b5d9b8cfa0e523b596db5d1e7e6074dbee46 (diff) | |
download | emacs-48776b70115edf3775df19d80f734048dadff198.tar.gz |
Provide text directionality and language to HarfBuzz shaper
* lisp/language/tv-util.el (tai-viet-composition-function):
* lisp/language/ethio-util.el (ethio-composition-function):
* lisp/language/japanese.el (compose-gstring-for-variation-glyph):
* lisp/language/thai-util.el (thai-composition-function):
* lisp/language/misc-lang.el (arabic-shape-gstring):
* lisp/language/lao-util.el (lao-composition-function):
* lisp/language/hebrew.el (hebrew-shape-gstring):
* lisp/composite.el (compose-gstring-for-graphic)
(compose-gstring-for-dotted-circle, auto-compose-chars)
(compose-gstring-for-terminal): Accept 2nd argument DIRECTION; all
callers changed.
* src/composite.c (composition_reseat_it): Call
auto-composition-function with one more argument DIRECTION.
(syms_of_composite) <auto-composition-function>: Update the doc
string.
* src/ftfont.c (ftfont_shape_by_hb): Compute language and
direction, and set buffer properties accordingly.
* src/composite.c (autocmp_chars):
* src/w32uniscribe.c (uniscribe_shape):
* src/xftfont.c (xftfont_shape):
* src/ftfont.c (ftfont_shape, ftfont_shape_by_hb):
* src/font.c (Ffont_shape_gstring): Accept an additional argument
DIRECTION.
* src/macfont.m (lgstring_direction): New enum.
(mac_font_shape_1, mac_screen_font_shape, mac_font_shape):
Accept an additional argument specifying text direction. All
callers changed.
* src/font.c (syms_of_font): New symbols QL2R and QR2L.
* src/font.h (shape): Accept new argument DIRECTION. All
implementations changed. (Bug#33729)
(ftfont_shape): Update prototype.
Diffstat (limited to 'lisp/language/hebrew.el')
-rw-r--r-- | lisp/language/hebrew.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el index c004337c2f8..52188f44725 100644 --- a/lisp/language/hebrew.el +++ b/lisp/language/hebrew.el @@ -152,7 +152,7 @@ Bidirectional editing is supported."))) ;; (3) If the font has precomposed glyphs, use them as far as ;; possible. Adjust the remaining glyphs artificially. -(defun hebrew-shape-gstring (gstring) +(defun hebrew-shape-gstring (gstring direction) (let* ((font (lgstring-font gstring)) (otf (font-get font :otf)) (nchars (lgstring-char-len gstring)) @@ -172,7 +172,7 @@ Bidirectional editing is supported."))) ((or (assq 'hebr (car otf)) (assq 'hebr (cdr otf))) ;; FONT has OpenType features for Hebrew. - (font-shape-gstring gstring)) + (font-shape-gstring gstring direction)) (t ;; FONT doesn't have OpenType features for Hebrew. @@ -217,7 +217,7 @@ Bidirectional editing is supported."))) ;; Now IDX is an index to the first non-precomposed glyph. ;; Adjust positions of the remaining glyphs artificially. (if (font-get font :combining-capability) - (font-shape-gstring gstring) + (font-shape-gstring gstring direction) (setq base-width (lglyph-width (lgstring-glyph gstring 0))) (while (< idx nglyphs) (setq glyph (lgstring-glyph gstring idx)) |