From: Jan Djärv Date: Sun, 15 Sep 2013 19:43:32 +0000 (+0200) Subject: Fix compilation for GNUStep due to font changes. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1612 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=745d3809b6b0cc594a3e1f5dd24cd043b4c3532d;p=emacs.git Fix compilation for GNUStep due to font changes. * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 for syms_of_macfont. * nsfns.m (Fx_create_frame): Fix font driver registration for GNUStep. --- diff --git a/src/ChangeLog b/src/ChangeLog index e3b29c9b21d..0050d949dd2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2013-09-15 Jan Djärv + * nsfns.m (Fx_create_frame): Fix font driver registration for + GNUStep. + + * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 + for syms_of_macfont. + * nsterm.m: Include macfont.h. (ns_tmp_flags, ns_tmp_font): Remove. (ns_compute_glyph_string_overhangs): Check for driver Qns. diff --git a/src/font.c b/src/font.c index 27f4f5dca91..cc832f9a88a 100644 --- a/src/font.c +++ b/src/font.c @@ -5199,7 +5199,9 @@ EMACS_FONT_LOG is set. Otherwise, it is set to t. */); #endif /* HAVE_NTGUI */ #ifdef HAVE_NS syms_of_nsfont (); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050 syms_of_macfont (); +#endif #endif /* HAVE_NS */ #endif /* HAVE_WINDOW_SYSTEM */ } diff --git a/src/nsfns.m b/src/nsfns.m index 1b4e6b7f57e..574239873a0 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1175,15 +1175,14 @@ This function is an internal primitive--use `make-frame' instead. */) block_input (); -#ifdef NS_IMPL_GNUSTEP || \ - MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 - register_font_driver (&nsfont_driver, f); -#else +#ifdef NS_IMPL_COCOA +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (CTGetCoreTextVersion != NULL && CTGetCoreTextVersion () >= kCTVersionNumber10_5) mac_register_font_driver (f); - register_font_driver (&nsfont_driver, f); #endif +#endif + register_font_driver (&nsfont_driver, f); x_default_parameter (f, parms, Qfont_backend, Qnil, "fontBackend", "FontBackend", RES_TYPE_STRING);