aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2019-06-02 13:30:21 +0900
committerYAMAMOTO Mitsuharu2019-06-02 13:30:21 +0900
commit2ae0c7a434dcdcc53e2ccfc758093714b0695c3b (patch)
treeb0a4ee4d142be9b3c171f933c43233ae303d6c0f
parent1ab69630dcb8c7a1b1b4171211a7c8ebf11b0d1c (diff)
downloademacs-2ae0c7a434dcdcc53e2ccfc758093714b0695c3b.tar.gz
emacs-2ae0c7a434dcdcc53e2ccfc758093714b0695c3b.zip
Revert previous commit
This reverts commit 1ab69630dcb8c7a1b1b4171211a7c8ebf11b0d1c. It has a wrong commit message.
-rw-r--r--configure.ac7
-rw-r--r--src/ftcrfont.c6
-rw-r--r--src/ftfont.c30
-rw-r--r--src/ftxfont.c2
-rw-r--r--src/xftfont.c2
5 files changed, 10 insertions, 37 deletions
diff --git a/configure.ac b/configure.ac
index bd51f54212c..b228571c177 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3413,13 +3413,6 @@ if test "${HAVE_X11}" = "yes"; then
3413 if test "${HAVE_FREETYPE}" = "yes"; then 3413 if test "${HAVE_FREETYPE}" = "yes"; then
3414 AC_DEFINE(HAVE_FREETYPE, 1, 3414 AC_DEFINE(HAVE_FREETYPE, 1,
3415 [Define to 1 if using the freetype and fontconfig libraries.]) 3415 [Define to 1 if using the freetype and fontconfig libraries.])
3416 OLD_CFLAGS=$CFLAGS
3417 OLD_LIBS=$LIBS
3418 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
3419 LIBS="$FREETYPE_LIBS $LIBS"
3420 AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex)
3421 CFLAGS=$OLD_CFLAGS
3422 LIBS=$OLD_LIBS
3423 if test "${with_libotf}" != "no"; then 3416 if test "${with_libotf}" != "no"; then
3424 EMACS_CHECK_MODULES([LIBOTF], [libotf]) 3417 EMACS_CHECK_MODULES([LIBOTF], [libotf])
3425 if test "$HAVE_LIBOTF" = "yes"; then 3418 if test "$HAVE_LIBOTF" = "yes"; then
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 1c28a7ceb67..0c3b74ff289 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -455,7 +455,7 @@ ftcrfont_shape (Lisp_Object lgstring, Lisp_Object direction)
455} 455}
456#endif 456#endif
457 457
458#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX 458#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
459static int 459static int
460ftcrfont_variation_glyphs (struct font *font, int c, unsigned variations[256]) 460ftcrfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
461{ 461{
@@ -470,7 +470,7 @@ ftcrfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
470 470
471 return result; 471 return result;
472} 472}
473#endif /* HAVE_OTF_GET_VARIATION_GLYPHS || HAVE_FT_FACE_GETCHARVARIANTINDEX */ 473#endif /* HAVE_OTF_GET_VARIATION_GLYPHS */
474 474
475static int 475static int
476ftcrfont_draw (struct glyph_string *s, 476ftcrfont_draw (struct glyph_string *s,
@@ -583,7 +583,7 @@ struct font_driver const ftcrfont_driver =
583#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 583#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
584 .shape = ftcrfont_shape, 584 .shape = ftcrfont_shape,
585#endif 585#endif
586#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX 586#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
587 .get_variation_glyphs = ftcrfont_variation_glyphs, 587 .get_variation_glyphs = ftcrfont_variation_glyphs,
588#endif 588#endif
589 .filter_properties = ftfont_filter_properties, 589 .filter_properties = ftfont_filter_properties,
diff --git a/src/ftfont.c b/src/ftfont.c
index efd0fcbd8c0..97ab4d0e377 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2820,41 +2820,21 @@ ftfont_shape (Lisp_Object lgstring, Lisp_Object direction)
2820 2820
2821#endif /* HAVE_M17N_FLT */ 2821#endif /* HAVE_M17N_FLT */
2822 2822
2823#endif /* HAVE_LIBOTF */ 2823#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
2824 2824
2825#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX
2826int 2825int
2827ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256]) 2826ftfont_variation_glyphs (struct font *font, int c, unsigned variations[256])
2828{ 2827{
2829 struct font_info *ftfont_info = (struct font_info *) font; 2828 struct font_info *ftfont_info = (struct font_info *) font;
2830#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
2831 OTF *otf = ftfont_get_otf (ftfont_info); 2829 OTF *otf = ftfont_get_otf (ftfont_info);
2832 2830
2833 if (! otf) 2831 if (! otf)
2834 return 0; 2832 return 0;
2835 return OTF_get_variation_glyphs (otf, c, variations); 2833 return OTF_get_variation_glyphs (otf, c, variations);
2836#else /* !HAVE_OTF_GET_VARIATION_GLYPHS */
2837 FT_Face ft_face = ftfont_info->ft_size->face;
2838 int i, n = 0;
2839
2840 for (i = 0; i < 16; i++)
2841 {
2842 variations[i] = FT_Face_GetCharVariantIndex (ft_face, c, 0xFE00 + i);
2843 if (variations[i])
2844 n++;
2845 }
2846 for (; i < 256; i++)
2847 {
2848 variations[i] = FT_Face_GetCharVariantIndex (ft_face, c,
2849 0xE0100 + (i - 16));
2850 if (variations[i])
2851 n++;
2852 }
2853
2854 return n;
2855#endif /* !HAVE_OTF_GET_VARIATION_GLYPHS */
2856} 2834}
2857#endif /* HAVE_OTF_GET_VARIATION_GLYPHS || HAVE_FT_FACE_GETCHARVARIANTINDEX */ 2835
2836#endif /* HAVE_OTF_GET_VARIATION_GLYPHS */
2837#endif /* HAVE_LIBOTF */
2858 2838
2859#ifdef HAVE_HARFBUZZ 2839#ifdef HAVE_HARFBUZZ
2860 2840
@@ -2956,7 +2936,7 @@ static struct font_driver const ftfont_driver =
2956#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 2936#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
2957 .shape = ftfont_shape, 2937 .shape = ftfont_shape,
2958#endif 2938#endif
2959#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX 2939#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
2960 .get_variation_glyphs = ftfont_variation_glyphs, 2940 .get_variation_glyphs = ftfont_variation_glyphs,
2961#endif 2941#endif
2962 .filter_properties = ftfont_filter_properties, 2942 .filter_properties = ftfont_filter_properties,
diff --git a/src/ftxfont.c b/src/ftxfont.c
index b1467360ad6..da3e3fbae10 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -351,7 +351,7 @@ struct font_driver const ftxfont_driver =
351#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 351#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
352 .shape = ftfont_shape, 352 .shape = ftfont_shape,
353#endif 353#endif
354#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX 354#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
355 .get_variation_glyphs = ftfont_variation_glyphs, 355 .get_variation_glyphs = ftfont_variation_glyphs,
356#endif 356#endif
357 .filter_properties = ftfont_filter_properties, 357 .filter_properties = ftfont_filter_properties,
diff --git a/src/xftfont.c b/src/xftfont.c
index 04cda12fb52..c1b93b76f57 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -661,7 +661,7 @@ struct font_driver const xftfont_driver =
661#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 661#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
662 .shape = xftfont_shape, 662 .shape = xftfont_shape,
663#endif 663#endif
664#if defined HAVE_OTF_GET_VARIATION_GLYPHS || defined HAVE_FT_FACE_GETCHARVARIANTINDEX 664#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
665 .get_variation_glyphs = ftfont_variation_glyphs, 665 .get_variation_glyphs = ftfont_variation_glyphs,
666#endif 666#endif
667 .filter_properties = ftfont_filter_properties, 667 .filter_properties = ftfont_filter_properties,