Port the font backend from the Mac port.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 15 Sep 2013 17:58:46 +0000 (19:58 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 15 Sep 2013 17:58:46 +0000 (19:58 +0200)
commit3fa2054efdfa3c22456072254e6c67682a595233
treef882ecc281d2ac5d5aefd27e2c22ece5a0bb0ca4
parentc089653d568d5c696f2d35e1bcf9bba64af85b97
Port the font backend from the Mac port.

* configure.ac: Add check for OSX 10.5, required for macfont.o.

* etc/NEWS: Mention the macfont backend.

* src/Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.

* src/font.c (syms_of_font): Call syms_of_macfont.

* src/font.h: Declare syms_of_macfont.

* src/nsfns.m: Include macfont.h.
(Fx_create_frame): Register macfont driver, make a better default font.
(Fns_popup_font_panel): Get font from macfont driver, if used.

* src/nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
(nsfont_open): Set font driver type.
Set font->ascent and font->descent.  Figure out font instead of
ns_tmp_font, and flags instead of ns_tmp_flags.
Fix indentation. Remove call to ns_draw_text_decoration,
moved to nsterm.

* src/nsterm.m: Include macfont.h.
(ns_tmp_flags, ns_tmp_font): Remove.
(ns_compute_glyph_string_overhangs): Check for driver Qns.
(ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
ns_tmp_font.  Call ns_draw_text_decoration here instead of nsfont.m.
(changeFont:): Fix code style.  Check for font driver type when
getiing font.

* src/nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
(f)->descent.
12 files changed:
ChangeLog
configure.ac
etc/ChangeLog
etc/NEWS
src/ChangeLog
src/Makefile.in
src/font.c
src/font.h
src/nsfns.m
src/nsfont.m
src/nsterm.h
src/nsterm.m