fix a problem with the interaction of Pango and AppKit

This commit is contained in:
Matthew Flatt 2012-02-21 14:46:28 -07:00
parent 190fbcd7ce
commit c1759243d4

View File

@ -45,6 +45,14 @@
(define-ffi-definer define-pangowin32 pangowin32-lib
#:provide provide)
;; Pango's Core Text back-end can somehow go wrong if we're going to eventually
;; use AppKit but don't load AppKit it before using functions such as
;; `pango_cairo_font_map_get_default'. So, force AppKit now for the platform
;; where the Core Text back-end is used:
(when (equal? "x86_64-macosx/3m"
(path->string (system-library-subpath)))
(void (ffi-lib (format "/System/Library/Frameworks/AppKit.framework/AppKit"))))
(define PangoContext (_cpointer 'PangoContext))
(define PangoLayout (_cpointer 'PangoLayout))
(define PangoFontDescription (_cpointer 'PangoFontDescription))