aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2013-01-13 12:03:01 -0800
committerGlenn Morris2013-01-13 12:03:01 -0800
commitc0511b57692c7a27d3632c34653dab5cfed629ef (patch)
tree6e3772eda7ab9082fe5b1639746040ac6cd666a0 /src
parent0b59090ba3d9b9e3d96d3e80d7031dc46bc2d134 (diff)
parent2e7a1892492d450d1fdf52cc704dd8f5d3a9cb18 (diff)
downloademacs-c0511b57692c7a27d3632c34653dab5cfed629ef.tar.gz
emacs-c0511b57692c7a27d3632c34653dab5cfed629ef.zip
Merge from emacs-24; up to 2012-12-10T20:27:33Z!eggert@cs.ucla.edu
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog13
-rw-r--r--src/emacs.c19
-rw-r--r--src/nsfont.m7
-rw-r--r--src/sysdep.c19
4 files changed, 36 insertions, 22 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 526d3db3dbf..9096b904171 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
12013-01-13 Jan Djärv <jan.h.d@swipnet.se>
2
3 * nsfont.m (LCD_SMOOTHING_MARGIN): New define.
4 (nsfont_draw): Remove disabling of LCD smoothing.
5 (ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
6 Bug#11484 with LCD smoothing on.
7
82013-01-13 Paul Eggert <eggert@cs.ucla.edu>
9
10 Fix SIGDANGER handlers, for AIX (Bug#13408).
11 * sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
12 Move handlers here from emacs.c; they were out of place.
13
12013-01-11 Jan Djärv <jan.h.d@swipnet.se> 142013-01-11 Jan Djärv <jan.h.d@swipnet.se>
2 15
3 * xterm.c (syms_of_xterm): Adjust documentation for 16 * xterm.c (syms_of_xterm): Adjust documentation for
diff --git a/src/emacs.c b/src/emacs.c
index e3409a431d6..91a7ce6390d 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -344,25 +344,6 @@ terminate_due_to_signal (int sig, int backtrace_limit)
344 /* This shouldn't be executed, but it prevents a warning. */ 344 /* This shouldn't be executed, but it prevents a warning. */
345 exit (1); 345 exit (1);
346} 346}
347
348#ifdef SIGDANGER
349
350/* Handler for SIGDANGER. */
351static void
352handle_danger_signal (int sig)
353{
354 malloc_warning ("Operating system warns that virtual memory is running low.\n");
355
356 /* It might be unsafe to call do_auto_save now. */
357 force_auto_save_soon ();
358}
359
360static void
361deliver_danger_signal (int sig)
362{
363 deliver_process_signal (sig, handle_danger_signal);
364}
365#endif
366 347
367/* Code for dealing with Lisp access to the Unix command line. */ 348/* Code for dealing with Lisp access to the Unix command line. */
368 349
diff --git a/src/nsfont.m b/src/nsfont.m
index 39f9e2ef3bc..5039f0c9013 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -44,6 +44,7 @@ Author: Adrian Robert (arobert@cogsci.ucsd.edu)
44#endif 44#endif
45 45
46#define NSFONT_TRACE 0 46#define NSFONT_TRACE 0
47#define LCD_SMOOTHING_MARGIN 2
47 48
48extern Lisp_Object Qns; 49extern Lisp_Object Qns;
49extern Lisp_Object Qnormal, Qbold, Qitalic; 50extern Lisp_Object Qnormal, Qbold, Qitalic;
@@ -1247,7 +1248,6 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
1247 else 1248 else
1248 CGContextSetShouldAntialias (gcontext, 1); 1249 CGContextSetShouldAntialias (gcontext, 1);
1249 1250
1250 CGContextSetShouldSmoothFonts (gcontext, NO);
1251 CGContextSetTextMatrix (gcontext, fliptf); 1251 CGContextSetTextMatrix (gcontext, fliptf);
1252 1252
1253 if (bgCol != nil) 1253 if (bgCol != nil)
@@ -1414,11 +1414,12 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
1414 1414
1415 lb = r.origin.x; 1415 lb = r.origin.x;
1416 rb = r.size.width - w; 1416 rb = r.size.width - w;
1417 // Add to bearing for LCD smoothing. We don't know if it is there.
1417 if (lb < 0) 1418 if (lb < 0)
1418 metrics->lbearing = round (lb); 1419 metrics->lbearing = round (lb - LCD_SMOOTHING_MARGIN);
1419 if (font_info->ital) 1420 if (font_info->ital)
1420 rb += 0.22 * font_info->height; 1421 rb += 0.22 * font_info->height;
1421 metrics->rbearing = lrint (w + rb); 1422 metrics->rbearing = lrint (w + rb + LCD_SMOOTHING_MARGIN);
1422 1423
1423 metrics->descent = r.origin.y < 0 ? -r.origin.y : 0; 1424 metrics->descent = r.origin.y < 0 ? -r.origin.y : 0;
1424 /*lrint (hshrink * [sfont ascender] + expand * hd/2); */ 1425 /*lrint (hshrink * [sfont ascender] + expand * hd/2); */
diff --git a/src/sysdep.c b/src/sysdep.c
index 158d2f73eec..0e9a6826005 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -1678,6 +1678,25 @@ deliver_arith_signal (int sig)
1678 deliver_thread_signal (sig, handle_arith_signal); 1678 deliver_thread_signal (sig, handle_arith_signal);
1679} 1679}
1680 1680
1681#ifdef SIGDANGER
1682
1683/* Handler for SIGDANGER. */
1684static void
1685handle_danger_signal (int sig)
1686{
1687 malloc_warning ("Operating system warns that virtual memory is running low.\n");
1688
1689 /* It might be unsafe to call do_auto_save now. */
1690 force_auto_save_soon ();
1691}
1692
1693static void
1694deliver_danger_signal (int sig)
1695{
1696 deliver_process_signal (sig, handle_danger_signal);
1697}
1698#endif
1699
1681/* Treat SIG as a terminating signal, unless it is already ignored and 1700/* Treat SIG as a terminating signal, unless it is already ignored and
1682 we are in --batch mode. Among other things, this makes nohup work. */ 1701 we are in --batch mode. Among other things, this makes nohup work. */
1683static void 1702static void