diff options
| author | Khaled Hosny | 2018-06-05 12:34:04 +0200 |
|---|---|---|
| committer | Khaled Hosny | 2018-12-10 00:08:50 +0200 |
| commit | 9014e05fcb1bdfee3d4a0d10129bd1f9cf6a85ab (patch) | |
| tree | 7ca62a014b074391cce33d2212d25dc35cc62bb4 | |
| parent | a2bea377c7d7fc39d664802aab7633d325b97927 (diff) | |
| download | emacs-9014e05fcb1bdfee3d4a0d10129bd1f9cf6a85ab.tar.gz emacs-9014e05fcb1bdfee3d4a0d10129bd1f9cf6a85ab.zip | |
Allow turning HarfBuzz off at run time
Useful for comparing the shaping result with that of m17n.
| -rw-r--r-- | src/ftfont.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index eb7c5d10e15..d98652f379c 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -2784,14 +2784,19 @@ ftfont_shape (Lisp_Object lgstring) | |||
| 2784 | struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring)); | 2784 | struct font *font = CHECK_FONT_GET_OBJECT (LGSTRING_FONT (lgstring)); |
| 2785 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; | 2785 | struct ftfont_info *ftfont_info = (struct ftfont_info *) font; |
| 2786 | #ifdef HAVE_HARFBUZZ | 2786 | #ifdef HAVE_HARFBUZZ |
| 2787 | return ftfont_shape_by_hb (lgstring, ftfont_info->ft_size->face, | 2787 | if (getenv ("EMACS_NO_HARFBUZZ") == NULL) |
| 2788 | &ftfont_info->matrix); | 2788 | { |
| 2789 | #else | 2789 | return ftfont_shape_by_hb (lgstring, ftfont_info->ft_size->face, |
| 2790 | OTF *otf = ftfont_get_otf (ftfont_info); | 2790 | &ftfont_info->matrix); |
| 2791 | } | ||
| 2792 | else | ||
| 2793 | #endif /* HAVE_HARFBUZZ */ | ||
| 2794 | { | ||
| 2795 | OTF *otf = ftfont_get_otf (ftfont_info); | ||
| 2791 | 2796 | ||
| 2792 | return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, otf, | 2797 | return ftfont_shape_by_flt (lgstring, font, ftfont_info->ft_size->face, |
| 2793 | &ftfont_info->matrix); | 2798 | otf, &ftfont_info->matrix); |
| 2794 | #endif | 2799 | } |
| 2795 | } | 2800 | } |
| 2796 | 2801 | ||
| 2797 | #endif /* defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ */ | 2802 | #endif /* defined HAVE_M17N_FLT || defined HAVE_HARFBUZZ */ |