From 444a42fd1090a5f90f7d272b12fee3a6c2b8b2eb Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Tue, 26 Sep 2006 08:49:05 +0000 Subject: [PATCH] (mac_compute_glyph_string_overhangs, XLoadQueryFont) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw before QDTextBounds. --- src/ChangeLog | 5 +++++ src/macterm.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 8d1bb3cf193..147d3533886 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-09-26 YAMAMOTO Mitsuharu + + * macterm.c (mac_compute_glyph_string_overhangs, XLoadQueryFont) + [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw before QDTextBounds. + 2006-09-26 Kenichi Handa * keymap.c (Fsingle_key_description): For an invalid char, return diff --git a/src/macterm.c b/src/macterm.c index 6f9e6273cb7..72812d38304 100644 --- a/src/macterm.c +++ b/src/macterm.c @@ -2634,6 +2634,11 @@ mac_compute_glyph_string_overhangs (s) Rect r; MacFontStruct *font = s->font; +#if USE_CG_DRAWING + mac_prepare_for_quickdraw (s->f); +#endif + SetPortWindowPort (FRAME_MAC_WINDOW (s->f)); + TextFont (font->mac_fontnum); TextSize (font->mac_fontsize); TextFace (font->mac_fontface); @@ -8001,6 +8006,9 @@ XLoadQueryFont (Display *dpy, char *fontname) FontInfo the_fontinfo; int is_two_byte_font; +#if USE_CG_DRAWING + mac_prepare_for_quickdraw (NULL); +#endif /* Save the current font number used. */ GetPort (&port); #if TARGET_API_MAC_CARBON -- 2.39.2