aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | ; Merge from origin/emacs-26Glenn Morris2019-06-070-0/+0
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | The following commit was skipped: 04f13a5 Disable byte-compile-cond-use-jump-table (Bug#35770)
| | * | Disable byte-compile-cond-use-jump-table (Bug#35770)Noam Postavsky2019-06-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-cond-use-jump-table): Set to nil by default. Don't merge to master, the bug is already fixed there.
| * | | Merge from origin/emacs-26Glenn Morris2019-06-071-1/+3
| |\ \ \ | | |/ / | | | | | | | | 2860285 Allow macros autoloaded as functions during bytecomp (Bug#36022)
| | * | Allow macros autoloaded as functions during bytecomp (Bug#36022)Noam Postavsky2019-06-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-callargs-warn): Don't pass symbols which don't have a known definition to byte-compile--function-signature, it fails to compile code which previously compiled successfully (for example, gnus.el until 2019-06-01 "* lisp/gnus/gnus.el: Mark autoloaded macros as such" which autoloads some macros as if they were functions).
* | | | Support text shaping with HarfBuzzEli Zaretskii2019-06-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to support HarfBuzz was written by these individuals: Khaled Hosny <dr.khaled.hosny@gmail.com> YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> Eli Zaretskii <eliz@gnu.org> * src/xftfont.c (xftfont_list): Call ftfont_list2. (xftfont_match): Call ftfont_match2. (xftfont_open) [HAVE_HARFBUZZ]: Set the font driver to xfthbfont_driver as required. Reset xftfont_info->hb_font to NULL. (xftfont_close) [HAVE_HARFBUZZ]: Dispose of the hb_font object. (xftfont_shape): Accept an additional argument DIRECTION and pass it to ftfont_shape. (xfthbfont_list, xfthbfont_match, xfthbfont_begin_hb_font) (xfthbfont_end_hb_font) [HAVE_HARFBUZZ]: New functions. (syms_of_xftfont): New DEFSYM 'xfthb'. (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize xfthbfont_driver. * src/xfns.c (Fx_create_frame, x_create_tip_frame) [HAVE_HARFBUZZ]: Register the HarfBuzz font driver. * src/w32uniscribe.c (bswap_32) [HAVE_HARFBUZZ]: Define to use the builtin for GCC 4.3.9 and newer; else use byteswap.h from Gnulib. (struct uniscribe_font_info): New member 'scale'. The member 'cache' is now used both by Uniscribe and HarfBuzz backends. (uniscribe_open): Set the font backend as required by the font entity's font_type field. (uniscribe_close) [HAVE_HARFBUZZ]: Dispose of the hb_font object. (uniscribe_shape): Accept an additional argument DIRECTION. (w32hb_list, w32hb_match, free_cb, w32hb_get_font_table) (w32hb_get_font, w32hb_encode_char, w32hb_begin_font) (w32hb_get_variation_glyphs, load_harfbuzz_funcs) [HAVE_HARFBUZZ]: New functions. (syms_of_w32uniscribe_for_pdumper): Initialize harfbuzz_font_driver if loading the requisite functions from the HarfBuzz DLL succeeded. * src/w32font.c (syms_of_w32font): New DEFSYM 'harfbuzz'. * src/w32fns.c (Fx_create_frame, w32_create_tip_frame): Determine whether we should register the HarfBuzz backend, or Uniscribe backend, or both for the new frame. * src/w32common.h (hbfont_init_w32_funcs) [HAVE_HARFBUZZ]: Add prototype. * src/macfont.m (lgstring_direction): New enumeration. (mac_font_shape_1, mac_screen_font_shape, macfont_shape): Accept an additional argument DIRECTION; all callers changed. * src/lisp.h (get_unicode_property): Add prototype. * src/hbfont.c: New file. * src/ftxfont.c (ftxfont_list): Call ftfont_list2. (ftxfont_match): Call ftfont_match2. * src/ftfont.h [HAVE_HARFBUZZ]: Include hb.h and hb-ft.h. (struct font_info): New member hb_font. * src/ftfont.c (ftfont_list2, ftfont_list_family): New functions. (ftfont_open) [HAVE_HARFBUZZ]: Reset ftfont_info->hb_font to NULL. Set the font backend to fthbfont_driver when required. (ftfont_close) [HAVE_HARFBUZZ]: Dispose of ftfont_info->hb_font. (ftfont_glyph_metrics): New function. (ftfont_text_extents): Call ftfont_glyph_metrics instead of FT_Load_Glyph. (ftfont_shape): Accept an additional argument DIRECTION. (ftfont_variation_glyphs) [!HAVE_OTF_GET_VARIATION_GLYPHS]: Support for variation glyphs without FLT. (fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: New function. (syms_of_ftfont): New DEFSYM freetypehb. (syms_of_ftfont_for_pdumper): Initialize fthbfont_driver. * src/ftcrfont.c (ftcrfont_list): Call ftfont_list2. (ftcrfont_match): Call ftfont_match2. (ftcrfont_open) [HAVE_HARFBUZZ]: Set the font backend to ftcrhbfont_driver as required. Reset ftcrfont_info->hb_font to NULL. (ftcrfont_close) [HAVE_HARFBUZZ]: Discard of ftcrfont_info->hb_font. (ftcrfont_shape): Pass DIRECTION to ftfont_shape. (ftcrhbfont_list, ftcrhbfont_match) (ftcrhbfont_begin_hb_font, ftcrhbfont_end_hb_font) [HAVE_HARFBUZZ]: New functions. (syms_of_ftcrfont): New DEFSYM ftcrhb. (syms_of_ftcrfont_for_pdumper): Initialize ftcrhbfont_driver. * src/font.h [HAVE_HARFBUZZ]: Include hb.h. (struct font_driver): Update comments and function signatures to reflect the new argument DIRECTION accepted by the 'shape' method. New methods 'begin_hb_font' and 'end_hb_font'. (hbfont_shape, hbfont_combining_capability) (fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: Add prototypes. * src/font.c (Ffont_shape_gstring): Accept an additional argument DIRECTION, and pass it to the font driver's 'shape' method. (Ffont_variation_glyphs): Doc fix. (syms_of_font): New DEFSYMS L2R and R2L. * src/composite.h (composition_reseat_it): Adjust prototype. * src/composite.c (autocmp_chars): Accept additional argument DIRECTION, and pass it to auto-composition-function. All callers changed. (composition_reseat_it): Accept additional argument BIDI_LEVEL, and use it to determine the DIRECTION argument to be passed to autocmp_chars. All callers changed. (syms_of_composite) <auto-composition-function>: Improve the doc string; document the meaning of the new argument DIRECTION. * src/chartab.c (get_unicode_property): New function, refactored from the body of get-unicode-property-internal. (Fget_unicode_property_internal): Call get_unicode_property after validating the input arguments. * src/Makefile.in (HARFBUZZ_CFLAGS, HARFBUZZ_LIBS): New macros. (EMACS_CFLAGS): Use HARFBUZZ_CFLAGS. (SOME_MACHINE_OBJECTS): Add hbfont.o (LIBES): Add HARFBUZZ_LIBS. * lisp/language/tv-util.el (tai-viet-composition-function): * 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/japanese.el (compose-gstring-for-variation-glyph): * lisp/language/hebrew.el (hebrew-shape-gstring): * lisp/language/ethio-util.el (ethio-composition-function): * lisp/composite.el (compose-chars-after) (compose-gstring-for-graphic) (compose-gstring-for-dotted-circle) (compose-gstring-for-terminal, auto-compose-chars): All composition functions that call shapers now accept an additional argument DIRECTION, either L2R or R2L. * etc/NEWS: Document the HarfBuzz support. * etc/HELLO: Add diacritics to Hebrew greetings. * doc/lispref/frames.texi (Font and Color Parameters): * doc/emacs/msdos.texi (Windows Fonts): Describe the 'harfbuzz' font backend on MS-Windows and how it is preferred to 'uniscribe'. * configure.ac (--wthout-harfbuzz): New option. (HAVE_HARFBUZZ): New tests. (FONT_OBJ) [HAVE_HARFBUZZ]: Add hbfont.o (emacs_config_features): Add HARFBUZZ. * admin/nt/dist-build/build-dep-zips.py: Add HarfBuzz dependency.
* | | | Merge remote-tracking branch 'origin/harfbuzz'Eli Zaretskii2019-06-0736-224/+1516
|\ \ \ \ | |/ / / |/| | |
| * | | Update dependenciesPhillip Lord2019-06-031-2/+3
| | | | | | | | | | | | | | | | * admin/nt/dist-build/build-dep-zips.py: Add harfbuzz as dependency
| * | | ; * src/hbfont.c (hbfont_shape): Fix a typo in a comment.Eli Zaretskii2019-06-021-1/+1
| | | |
| * | | Implement the get_variation_glyphs method for FreeType >= 2.3.6YAMAMOTO Mitsuharu2019-06-025-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Check availability of FT_Face_GetCharVariantIndex. * src/ftfont.c (ftfont_variation_glyphs) [HAVE_FT_FACE_GETCHARVARIANTINDEX]: Add function implementation. * src/ftcrfont.c (ftcrfont_variation_glyphs) [HAVE_FT_FACE_GETCHARVARIANTINDEX]: Use function implementation for HAVE_OTF_GET_VARIATION_GLYPHS. * src/ftfont.c (ftfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]: * src/xftfont.c (xftfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]: * src/ftxfont.c (ftxfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]: * src/ftcrfont.c (ftcrfont_driver) [HAVE_FT_FACE_GETCHARVARIANTINDEX]: Populate the get_variation_glyphs method.
| * | | Revert previous commitYAMAMOTO Mitsuharu2019-06-025-37/+10
| | | | | | | | | | | | | | | | | | | | This reverts commit 1ab69630dcb8c7a1b1b4171211a7c8ebf11b0d1c. It has a wrong commit message.
| * | | Make fthbfont and derivatives use common HarfBuzz code in hbfont.cYAMAMOTO Mitsuharu2019-06-025-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/font.h (fthbfont_shape, fthbfont_combining_capability) [HAVE_HARFBUZZ]: Remove prototypes. * src/ftfont.c: Don't include math.h. (uni_combining, uni_general, uni_mirroring, get_hb_unicode_funcs) (fthbfont_shape_by_hb, fthbfont_combining_capability, fthbfont_shape) [HAVE_HARFBUZZ]: Remove functions. * src/ftfont.c (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]: * src/xftfont.c (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]: Use hbfont_shape and hbfont_combining_capability for fthbfont_shape and fthbfont_combining_capability, respectively.
| * | | Make fthbfont and derivatives use common HarfBuzz code in hbfont.cYAMAMOTO Mitsuharu2019-06-024-299/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/font.h (fthbfont_shape, fthbfont_combining_capability) [HAVE_HARFBUZZ]: Remove prototypes. * src/ftfont.c: Don't include math.h. (uni_combining, uni_general, uni_mirroring, get_hb_unicode_funcs) (fthbfont_shape_by_hb, fthbfont_combining_capability, fthbfont_shape) [HAVE_HARFBUZZ]: Remove functions. * src/ftfont.c (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]: * src/xftfont.c (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]: Use hbfont_shape and hbfont_combining_capability instead of fthbfont_shape and fthbfont_combining_capability, respectively.
| * | | ; src/w32uniscribe.c: Remove redundant include of math.h.Eli Zaretskii2019-06-011-1/+0
| | | |
| * | | Port hbfont.c to GCC 9 with --enable-gcc-warningsPaul Eggert2019-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * src/hbfont.c (hbfont_shape): Use ptrdiff_t, not int, for indexes that in theory might overflow int. Add UNINIT to pacify GCC 9 and omit an unnecessary initialization.
| * | | ; * src/font.c (Ffont_variation_glyphs): Doc fix.Eli Zaretskii2019-06-011-3/+3
| | | |
| * | | Implement the get_variation_glyphs method for HarfBuzz on MS-WindowsEli Zaretskii2019-06-011-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32uniscribe.c [HAVE_HARFBUZZ]: DEF_DLL_FN hb_font_get_variation_glyph. (hb_font_get_variation_glyph): New redirection macro. (w32hb_get_variation_glyphs): New function. (load_harfbuzz_funcs): Load hb_font_get_variation_glyph. (syms_of_w32uniscribe_for_pdumper): Populate the get_variation_glyphs method of harfbuzz_font_driver.
| * | | ; * src/hbfont.c: Fix commentary.Eli Zaretskii2019-06-011-3/+1
| | | |
| * | | ; * etc/NEWS: Reflect changes in font backend loading.Eli Zaretskii2019-06-011-1/+5
| | | |
| * | | Update the documentation due to changes in loading font backendsEli Zaretskii2019-06-011-11/+17
| | | | | | | | | | | | | | | | | | | | * doc/emacs/msdos.texi (Windows Fonts): Reflect the fact that Uniscribe is not enabled by default.
| * | | Prefer HarfBuzz to Uniscribe on MS-WindowsEli Zaretskii2019-06-011-4/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32fns.c (Fx_create_frame, w32_create_tip_frame): Register the Uniscribe font backend only if HarfBuzz is not available, or if explicitly requested via frame parameters or resources.
| * | | Move common HarfBuzz code to a common file hbfont.cEli Zaretskii2019-06-016-427/+503
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/hbfont.c: New file, with code moved from w32uniscribe.c and renamed/modified as appropriate. * src/w32uniscribe.c: Move to hbfont.c DEF_DLL_FN and macro definitions for HarfBuzz functions used in hbfont.c (load_harfbuzz_funcs): Move loading of HarfBuzz functions used by hbfont.c to hbfont.c:hbfont_init_w32_funcs, and call that function from here. (syms_of_w32uniscribe_for_pdumper): Fill the 'shape' and 'combining_capability' members with hbfont.c function names. * src/w32common.h (hbfont_init_w32_funcs) [HAVE_HARFBUZZ]: Add prototype. * src/font.h (hbfont_shape, hbfont_combining_capability) [HAVE_HARFBUZZ]: Add prototypes. * src/Makefile.in (SOME_MACHINE_OBJECTS): Add hbfont.o. * configure.ac (FONT_OBJ): Add hbfont.o if HAVE_HARFBUZZ.
| * | | ; * etc/NEWS: Mention support for HarfBuzz on MS-Windows.Eli Zaretskii2019-05-311-1/+2
| | | |
| * | | Enhance Hebrew display in HELLOEli Zaretskii2019-05-311-2/+2
| | | | | | | | | | | | | | | | | | | | * etc/HELLO: Show off display of Hebrew with diacriticals (a.k.a. "nikkud").
| * | | Fix handling of -xrm on MS-Windows broken by recent commitsEli Zaretskii2019-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32reg.c (w32_get_string_resource): The argument V_RDB is a 'char **', not a 'char *'. This fixes -xrm handling on MS-Windows, broken by conversion of x_get_string_resource to terminal-specific hook. (cherry picked from commit 833097cbc4856001ae77b33365faf09c1b3c30e3)
| * | | Unbreak display of characters on MS-WindowsEli Zaretskii2019-05-311-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32font.c (w32font_draw): Convert the glyph_string's char2b array to 16-bit WCHAR data that ExtTextOutW needs. (cherry picked from commit 38564f8a664347c42f7614d9c91e0d49e4a073e8)
| * | | Add HarfBuzz font backend for MS-WindowsEli Zaretskii2019-05-319-98/+831
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32uniscribe.c [HAVE_HARFBUZZ]: Include math.h and hb.h. (bswap_32): Define for GCC 4.3.0 and later; else include <byteswap.h> from Gnulib. (struct uniscribe_font_info): Extend for HarfBuzz; 'cache' is now a 'void *' (all users changed). [HAVE_HARFBUZZ]: Define typedefs for HarfBuzz functions to be loaded dynamically from the HarfBuzz DLL. Define macros to call those functions via function pointers. (uniscribe_open) [HAVE_HARFBUZZ]: Use the HarfBuzz font driver if the type of the font entity is 'harfbuzz'. (uniscribe_close) [HAVE_HARFBUZZ]: For fonts using the HarfBuzz backend, call hb_font_destroy to free memory used for the cached hb_font data. (uniscribe_shape): Fix assignment of character codepoints to glyphs from a single cluster. (w32hb_list, w32hb_match, free_cb, w32hb_get_font_table) (w32hb_get_font, w32hb_encode_char, w32hb_begin_font) (w32uni_combining, w32uni_general, w32uni_mirroring) (get_hb_unicode_funcs, w32hb_shape) (w32hb_combining_capability, load_harfbuzz_funcs) [HAVE_HARFBUZZ]: New functions. (syms_of_w32uniscribe_for_pdumper) [HAVE_HARFBUZZ]: Load the HarfBuzz DLL and register the HarfBuzz backend with its functions. * src/w32font.c (syms_of_w32font) <Qharfbuzz>: New DEFSYM. * src/w32fns.c (Fx_create_frame, w32_create_tip_frame) [HAVE_HARFBUZZ]: Register the harfbuzz font backend. * src/lisp.h (get_unicode_property): Declare prototype. * src/font.h (harfbuzz_font_driver) [HAVE_NTGUI]: Declare. * src/chartab.c (get_unicode_property): New function, body taken from get-unicode-property-internal. (Fget_unicode_property_internal): Call get_unicode_property after validating input. * doc/lispref/frames.texi (Font and Color Parameters): * doc/emacs/msdos.texi (Windows Fonts): Document support for HarfBuzz text shaping on MS-Windows. * configure.ac (HAVE_HARFBUZZ): Move out of the X-specific part, and consider HarfBuzz also for HAVE_W32 systems. Require HarfBuzz v1.2.3 for w32.
| * | | Merge branch 'master' into harfbuzzYAMAMOTO Mitsuharu2019-05-23603-6555/+8388
| |\ \ \
| * | | | Document font backends for Cairo and/or HarfBuzzYAMAMOTO Mitsuharu2019-05-111-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/frames.texi (Font and Color Parameters): Mention xfthb, ftcr, and ftcrhb font backends.
| * | | | * src/xfns.c (x_create_tip_frame): Register font drivers as in normal frames.YAMAMOTO Mitsuharu2019-05-111-1/+7
| | | | |
| * | | | Fix last changes in src/ftfont.cYAMAMOTO Mitsuharu2019-05-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.c (ftfont_shape): Add missing argument direction. (fthbfont_shape) [HAVE_HARFBUZZ]: Remove unused variable ftfont_info. (fthbfont_driver) [HAVE_HARFBUZZ]: Remove redundant redeclaration.
| * | | | Add new font backend drivers for text shaping by HarfBuzzYAMAMOTO Mitsuharu2019-05-057-102/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * etc/NEWS: Mention new font backend drivers xfthb and ftcrhb. * src/font.h [HAVE_HARFBUZZ]: Include hb.h. (struct font_driver) [HAVE_HARFBUZZ]: New members begin_hb_font and end_hb_font. (ftfont_match, ftfont_list): Remove externs. (ftfont_match2, ftfont_list2): (fthbfont_combining_capability, fthbfont_begin_hb_font) (fthbfont_shape) [HAVE_HARFBUZZ]: (xfthbfont_driver) [HAVE_XFT && HAVE_HARFBUZZ]: (ftcrhbfont_driver) [USE_CAIRO && HAVE_HARFBUZZ]: Add externs. * src/ftcrfont.c (ftcrfont_list): Use ftfont_list2. (ftcrfont_match): Use ftfont_match2. (ftcrfont_open): Get font type from entity. (ftcrfont_open) [HAVE_HARFBUZZ]: Use HarfBuzz version of driver if specified. (ftcrfont_shape) [HAVE_HARFBUZZ]: Make shaping fail. (ftcrhbfont_list, ftcrhbfont_match) (ftcrhbfont_begin_hb_font) [HAVE_HARFBUZZ]: New functions. (ftcrhbfont_driver) [HAVE_HARFBUZZ]: New variable. (syms_of_ftcrfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize and register it. (syms_of_ftcrfont) [HAVE_HARFBUZZ]: New symbol Qftcrhb. * src/ftfont.c: Include math.h for lround. (fthbfont_driver) [HAVE_HARFBUZZ]: New variable. (ftfont_get_hb_font) [HAVE_HARFBUZZ]: Remove function. (ftfont_list, ftfont_match): Make static. (ftfont_list2, ftfont_match2): New functions. (ftfont_open2) [HAVE_HARFBUZZ]: Use HarfBuzz version of driver if specified. (ftfont_open): Get font type from entity. (ftfont_shape, ftfont_combining_capability, ftfont_driver) [HAVE_HARFBUZZ]: Move HarfBuzz specific part from here ... (fthbfont_shape, fthbfont_combining_capability) (fthbfont_driver) [HAVE_HARFBUZZ]: ... to here. New functions and variable. (fthbfont_begin_hb_font) [HAVE_HARFBUZZ]: New function. (fthbfont_shape_by_hb) [HAVE_HARFBUZZ]: Rename from ftfont_shape_by_hb. Don't take FreeType specific arguments ft_face and matrix. Use begin_hb_font and end_hb_font font driver functions. Use text_extents font driver functions instead of ftfont_glyph_metrics. (syms_of_ftfont) [HAVE_HARFBUZZ]: New symbol Qfreetypehb. (syms_of_ftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize and register fthbfont_drivert. * src/ftxfont.c (ftxfont_list): Use ftfont_list2. (ftxfont_match): Use ftfont_match2. (ftxfont_driver) [HAVE_HARFBUZZ]: Don't initialize shape member explicitly. * src/xfns.c (Fx_create_frame) [USE_CAIRO && HAVE_HARFBUZZ]: (Fx_create_frame) [HAVE_XFT && HAVE_HARFBUZZ]: Register HarfBuzz versions of font drivers. * src/xftfont.c (xftfont_list): Use ftfont_list2. (xftfont_match): Use ftfont_match2. (xftfont_open): Get font type from entity. (xftfont_open) [HAVE_HARFBUZZ]: Use HarfBuzz version of driver if specified. (xftfont_shape) [HAVE_HARFBUZZ]: Make shaping fail. (xfthbfont_list, xfthbfont_match, xfthbfont_begin_hb_font) (xfthbfont_end_hb_font) [HAVE_HARFBUZZ]: New functions. (xftfont_driver) [HAVE_HARFBUZZ]: Don't initialize shape member explicitly. (xfthbfont_driver) [HAVE_HARFBUZZ]: New variable. (syms_of_xftfont_for_pdumper) [HAVE_HARFBUZZ]: Initialize and register it. (syms_of_xftfont) [HAVE_HARFBUZZ]: New symbol Qxfthb.
| * | | | Fix NS buildYAMAMOTO Mitsuharu2019-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * src/macfont.m: Fix prototype of macfont_shape. (mac_font_shape): Fix type of 5th argument.
| * | | | Merge branch 'master' into harfbuzzYAMAMOTO Mitsuharu2019-04-272783-27372/+49185
| |\ \ \ \
| * | | | | Unify three font info structuresRobert Pluim2019-02-084-115/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.h (struct font_info): New type, unifies similar types from ftcrfont.c, ftfont.c and xftfont.c * src/xftfont.c (struct xftfont_info): Remove, replace with struct font_info. Adjust all uses. * src/ftcrfont.c (struct ftcrfont_info): Likewise. * src/ftfont.c (struct ftfont_info): Likewise. (cherry picked from commit 9e0d69b5a17a0fa3b0dd099a51584a85f3ddb5bf)
| * | | | | Always set explicit HarfBuzz buffer directionKhaled Hosny2019-01-051-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If no direction was given by the caller, I assume the text will be drawn left to right, if this is not the case then callers must provide sensible direction. Letting HarfBuzz guess the direction is not appropriate since shaping and drawing must use the same direction. Also move hb_buffer_guess_segment_properties() call to the end, so it only guessing unset properties, until we completely get rid of it.
| * | | | | We need the bidi level not the paragraph directionKhaled Hosny2019-01-053-10/+10
| | | | | |
| * | | | | ; Fix last change in src /composite.c.Eli Zaretskii2019-01-021-4/+4
| | | | | |
| * | | | | Fix text direction of the HarfBuzz shaping bufferEli Zaretskii2019-01-024-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/indent.c (scan_for_column, compute_motion): * src/xdisp.c (CHAR_COMPOSED_P): Pass PDIR argument to composition_reseat_it. * src/composite.c (composition_reseat_it): Accept an additional argument PDIR that provides the current paragraph's base direction; all callers changed. Use PDIR to fix calculation of the DIRECTION argument to autocmp_chars. (Bug#33944) * src/composite.h: Include dispextern.h. (composition_reseat_it): Update prototype.
| * | | | | Provide text directionality and language to HarfBuzz shaperEli Zaretskii2018-12-2916-62/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * | | | | Clarify one FIXME a bitKhaled Hosny2018-12-241-2/+2
| | | | | |
| * | | | | Cache HarfBuzz bufferKhaled Hosny2018-12-241-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Potentially faster and less memory allocations. I did not do any measurements though, so possibly a micro optimization.
| * | | | | Remove one more FIXMEKhaled Hosny2018-12-241-2/+2
| | | | | |
| * | | | | Replace another FIXME with a TODO and expanded commentKhaled Hosny2018-12-221-1/+2
| | | | | |
| * | | | | Replace a FIXME with an expanded commentKhaled Hosny2018-12-221-3/+4
| | | | | |
| * | | | | Subclass default HarfBuzz Unicode functionsKhaled Hosny2018-12-221-33/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating new functions from scratch, subclass the default implementation and override the selected functions we want/can override. (Bug#33729)
| * | | | | Fix previous commitKhaled Hosny2018-12-221-0/+3
| | | | | |
| * | | | | Properly fix building with HarfBuzz and without libotfKhaled Hosny2018-12-224-12/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HarfBuzz support does not depend on libotf, the build breakage when libotf is missing was because code guarded with: #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF was incorrectly changed to: #if defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ this is now properly fixed by making it: #if (defined HAVE_M17N_FLT && defined HAVE_LIBOTF) || defined HAVE_HARFBUZZ Other changes in previous commits were reverted.
| * | | | | Fix one last compilation warning in ftfont.cEli Zaretskii2018-12-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.c (ftfont_get_hb_font): Only define if HAVE_LIBOTF is defined. (Bug#33771)
| * | | | | Condition some more hb_* functions on HAVE_LIBOTF.Eli Zaretskii2018-12-181-2/+1
| | | | | |
| * | | | | Avoid compilation warning in ftfont.cEli Zaretskii2018-12-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.c (ftfont_shape_by_hb): Compile only if HAVE_LIBOTF is defined. (Bug#33771)