diff options
| author | YAMAMOTO Mitsuharu | 2006-10-16 08:59:31 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-10-16 08:59:31 +0000 |
| commit | 7c682cf19411778cf0649a397eac435b80ed966a (patch) | |
| tree | 348a1c96b172e2bd3e44394e0cd59ec4b2b75c79 /src | |
| parent | 2e6266ac5774e0edc9b8b24456dc81e3f8805465 (diff) | |
| download | emacs-7c682cf19411778cf0649a397eac435b80ed966a.tar.gz emacs-7c682cf19411778cf0649a397eac435b80ed966a.zip | |
(mac_query_char_extents): Don't return glyph ID if layout
adjustment is needed.
(mac_load_query_font): Check if width and height are positive.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/macterm.c | 10 |
2 files changed, 21 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 984407e44fa..4c79b1cfaa7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2006-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 2 | |||
| 3 | * dispnew.c (adjust_frame_glyphs_for_frame_redisplay): Remove unused | ||
| 4 | variable ch_dim. | ||
| 5 | (adjust_frame_glyphs_for_window_redisplay): Likewise. Don't allocate | ||
| 6 | menu bar window matrices on non-X systems. | ||
| 7 | |||
| 8 | * mac.c (Fmac_get_preference, Fmac_code_convert_string): Add GCPROs. | ||
| 9 | |||
| 10 | * macterm.c (mac_query_char_extents): Don't return glyph ID if layout | ||
| 11 | adjustment is needed. | ||
| 12 | (mac_load_query_font): Check if width and height are positive. | ||
| 13 | |||
| 1 | 2006-10-14 Richard Stallman <rms@gnu.org> | 14 | 2006-10-14 Richard Stallman <rms@gnu.org> |
| 2 | 15 | ||
| 3 | * sysdep.c (init_sys_modes): Delete DEFVAR_LISP in the wrong place. | 16 | * sysdep.c (init_sys_modes): Delete DEFVAR_LISP in the wrong place. |
diff --git a/src/macterm.c b/src/macterm.c index 86f4c46c4c6..864852129e2 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -1198,7 +1198,12 @@ mac_query_char_extents (style, c, | |||
| 1198 | err1 = ATSUGetGlyphInfo (text_layout, kATSUFromTextBeginning, | 1198 | err1 = ATSUGetGlyphInfo (text_layout, kATSUFromTextBeginning, |
| 1199 | kATSUToTextEnd, &count, | 1199 | kATSUToTextEnd, &count, |
| 1200 | &glyph_info_array); | 1200 | &glyph_info_array); |
| 1201 | if (err1 == noErr) | 1201 | if (err1 == noErr |
| 1202 | /* Make sure that we don't have to make layout | ||
| 1203 | adjustments. */ | ||
| 1204 | && glyph_info_array.glyphs[0].deltaY == 0.0f | ||
| 1205 | && glyph_info_array.glyphs[0].idealX == 0.0f | ||
| 1206 | && glyph_info_array.glyphs[0].screenX == 0) | ||
| 1202 | { | 1207 | { |
| 1203 | xassert (glyph_info_array.glyphs[0].glyphID); | 1208 | xassert (glyph_info_array.glyphs[0].glyphID); |
| 1204 | *cg_glyph = glyph_info_array.glyphs[0].glyphID; | 1209 | *cg_glyph = glyph_info_array.glyphs[0].glyphID; |
| @@ -7963,7 +7968,8 @@ mac_load_query_font (f, fontname) | |||
| 7963 | NULL | 7968 | NULL |
| 7964 | #endif | 7969 | #endif |
| 7965 | ); | 7970 | ); |
| 7966 | if (err != noErr) | 7971 | if (err != noErr |
| 7972 | || space_bounds->width <= 0 || FONT_HEIGHT (font) <= 0) | ||
| 7967 | { | 7973 | { |
| 7968 | mac_unload_font (&one_mac_display_info, font); | 7974 | mac_unload_font (&one_mac_display_info, font); |
| 7969 | return NULL; | 7975 | return NULL; |