Commit 4363777d authored by Eli Zaretskii's avatar Eli Zaretskii

Move common HarfBuzz code to a common file hbfont.c

* 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.
parent b7730c25
Pipeline #1849 failed with stage
in 3 seconds
......@@ -5260,8 +5260,11 @@ if test "${HAVE_X_WINDOWS}" = "yes" ; then
elif test "$HAVE_FREETYPE" = "yes"; then
FONT_OBJ="$FONT_OBJ ftfont.o ftxfont.o"
fi
AC_SUBST(FONT_OBJ)
fi
if test "${HAVE_HARFBUZZ}" = "yes" ; then
FONT_OBJ="$FONT_OBJ hbfont.o"
fi
AC_SUBST(FONT_OBJ)
AC_SUBST(XMENU_OBJ)
AC_SUBST(XOBJ)
AC_SUBST(FONT_OBJ)
......
......@@ -299,6 +299,7 @@ W32_RES_LINK=@W32_RES_LINK@
## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE
## ftfont.o ftcrfont.o if USE_CAIRO
## else xfont.o
## if HAVE_HARFBUZZ, hbfont.o is added regardless of the rest
FONT_OBJ=@FONT_OBJ@
## Empty for MinGW, cm.o for the rest.
......@@ -431,7 +432,7 @@ SOME_MACHINE_OBJECTS = dosfns.o msdos.o \
w32.o w32console.o w32cygwinx.o w32fns.o w32heap.o w32inevt.o w32notify.o \
w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o \
w16select.o widget.o xfont.o ftfont.o xftfont.o ftxfont.o gtkutil.o \
xsettings.o xgselect.o termcap.o
xsettings.o xgselect.o termcap.o hbfont.o
## gmalloc.o if !SYSTEM_MALLOC && !DOUG_LEA_MALLOC, else empty.
GMALLOC_OBJ=@GMALLOC_OBJ@
......
......@@ -890,6 +890,11 @@ extern void font_fill_lglyph_metrics (Lisp_Object, Lisp_Object);
extern Lisp_Object font_put_extra (Lisp_Object font, Lisp_Object prop,
Lisp_Object val);
#ifdef HAVE_HARFBUZZ
extern Lisp_Object hbfont_shape (Lisp_Object, Lisp_Object);
extern Lisp_Object hbfont_combining_capability (struct font *);
#endif
#if defined (HAVE_XFT) || defined (HAVE_FREETYPE)
extern void font_put_frame_data (struct frame *, Lisp_Object, void *);
extern void *font_get_frame_data (struct frame *f, Lisp_Object);
......
This diff is collapsed.
......@@ -81,4 +81,8 @@ get_proc_addr (HINSTANCE handle, LPCSTR fname)
} \
while (false)
#ifdef HAVE_HARFBUZZ
extern bool hbfont_init_w32_funcs (HMODULE);
#endif
#endif /* W32COMMON_H */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment