aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | 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
| | | |
| * | | 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-015-426/+499
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
| * | | 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-316-31/+740
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2369-2457/+2445
| |\ \ \
| * | | | * 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-056-101/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-27231-7693/+16093
| |\ \ \ \
| * | | | | 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-297-36/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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)
| * | | | | Fix last change.Eli Zaretskii2018-12-171-1/+1
| | | | | |
| * | | | | * src/ftcrfont.c (ftcrfont_driver): Really commit last change.Mike Kupfer2018-12-171-1/+1
| | | | | |
| * | | | | More fixes for build without libotfMike Kupfer2018-12-173-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xftfont.c (xftfont_driver): * src/ftxfont.c (ftxfont_driver): * src/ftcrfont.c (ftcrfont_driver): Set the .shape member only if HAVE_LIBOTF is defined. (Bug#33771)
| * | | | | Fix compilation errors when building without libotfEli Zaretskii2018-12-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.c (ftfont_shape): Only compile if HAVE_LIBOTF is defined. (ftfont_driver): Set the .shape member only if HAVE_LIBOTF is defined. (Bug#33771)
| * | | | | Assume hb_ft_font_create_referenced if HarfBuzzPaul Eggert2018-12-141-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (HAVE_HB_FT_FONT_CREATE_REFERENCED): Remove test, since we now require 0.9.42 and hb_ft_font_create_referenced has been present since 0.9.38. * src/ftfont.c (ft_face_destroy, hb_ft_font_create_referenced): Remove; no longer needed.
| * | | | | Fix crash in the Cairo buildAri Roponen2018-12-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftcrfont.c (struct ftcrfont_info) [HAVE_HARFBUZZ]: New member 'hb_font'. (Bug#33739)
| * | | | | Simplify mainline Harfbuzz-using codePaul Eggert2018-12-131-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/ftfont.c (ft_face_destroy): Omit unnecessary cast. (hb_ft_font_create_referenced) [!HAVE_HB_FT_FONT_CREATE_REFERENCED]: New function. (ftfont_get_hb_font): Use it.
| * | | | | Fix uni_combining()Khaled Hosny2018-12-101-10/+8
| | | | | |
| * | | | | WIP: implement some Unicode callback functionsKhaled Hosny2018-12-101-0/+149
| | | | | |
| * | | | | Set cluster level to oneKhaled Hosny2018-12-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes to possible to edit combining marks separately as now they get a different cluster value from the base glyph.
| * | | | | Cache hb_font_tKhaled Hosny2018-12-102-20/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not sure if the xftfont.c changes are really needed, but followed the libotf code just in case.
| * | | | | Allow turning HarfBuzz off at run timeKhaled Hosny2018-12-101-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | Useful for comparing the shaping result with that of m17n.
| * | | | | First attempt at HarfBuzz shapingKhaled Hosny2018-12-105-35/+195
| | | | | | | | | | | | | | | | | | | | | | | | Barely works, and unoptimized!
| * | | | | Add support for building with HarfBuzzKhaled Hosny2018-12-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Not used yet.
* | | | | | Fix image_set_crop yet againYAMAMOTO Mitsuharu2019-06-071-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (image_set_crop) [HAVE_NATIVE_TRANSFORMS]: Don't call compute_image_size, as it is already called from image_set_size. (image_set_size, image_set_crop) [HAVE_NATIVE_TRANSFORMS]: Use harmless matrix transformation code also for USE_CAIRO and HAVE_NTGUI cases, though image_set_transform is not yet implemented on them.
* | | | | | Fix recently-introduced image_set_crop typoPaul Eggert2019-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c (image_set_crop) [!HAVE_NATIVE_TRANSFORMS]: Don’t call compute_image_size, as it does not exist and its result is not needed.
* | | | | | Use copy_file_range to copy filesPaul Eggert2019-06-071-8/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The copy_file_range syscall (introduced in Linux kernel version 4.5) can copy files more efficiently via server-side copy etc. * admin/merge-gnulib (GNULIB_MODULES): Add copy-file-range. * lib/copy-file-range.c, m4/copy-file-range.m4: New files, copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/fileio.c (Fcopy_file): Try copy_file_range first, falling back on read+write only if copy_file_range failed or if the input is empty and so could be a /proc file.
* | | | | | Fix overflow issues in image rotationPaul Eggert2019-06-062-93/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, do some refactoring to simplify code. * src/dispextern.h (INIT_MATRIX, COPY_MATRIX, MULT_MATRICES): Remove. * src/image.c (matrix3x3): New type, replacing all uses of 3x3 double. (matrix3x3_copy, matrix3x3_mult): New functions, replacing COPY_MATRIX, MULT_MATRICES. Replace INIT_MATRIX by C initializers. (image_set_rotation): Use Fmod to avoid undefined behavior on double-to-int conversion and to reduce bignum rotations correctly. (image_set_crop): Finish up previous correction, by not re-setting width and height if compute_image_size has set them. Prefer shifting right by 1 to dividing by 2 if either will do.
* | | | | | Fix redisplay glitches with RTL composed textEli Zaretskii2019-06-061-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (init_to_row_end): Fail if the first visible position on the line following ROW is bidi-reordered and could be composed. (Bug#35811)
* | | | | | Restore height and with from that were accidentally removedMark A. Hershberger2019-06-061-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See 610fb73ab6d7a22b722f523d6ebc4aa8fa1db7c9 USE_CARIO needs these.