aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
authorDaniel Colascione2012-09-17 04:07:36 -0800
committerDaniel Colascione2012-09-17 04:07:36 -0800
commit2ab329f3b5d52a39f0a45c3d9c129f1c19560142 (patch)
tree6dd6784d63e54cb18071df8e28fbdbc27d418728 /src/fontset.c
parentf701ab72dd55460d23c8b029550aa4d7ecef3cfa (diff)
parentbb7dce392f6d9d5fc4b9d7de09ff920a52f07669 (diff)
downloademacs-2ab329f3b5d52a39f0a45c3d9c129f1c19560142.tar.gz
emacs-2ab329f3b5d52a39f0a45c3d9c129f1c19560142.zip
Merge from trunk
Diffstat (limited to 'src/fontset.c')
-rw-r--r--src/fontset.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 783f99c210c..7295951bc21 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -26,7 +26,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26 26
27#include <config.h> 27#include <config.h>
28#include <stdio.h> 28#include <stdio.h>
29#include <setjmp.h>
30 29
31#include "lisp.h" 30#include "lisp.h"
32#include "blockinput.h" 31#include "blockinput.h"
@@ -185,21 +184,12 @@ void (*check_window_system_func) (void);
185 184
186 185
187/* Prototype declarations for static functions. */ 186/* Prototype declarations for static functions. */
188static void fontset_add (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
189static Lisp_Object fontset_find_font (Lisp_Object, int, struct face *,
190 int, int);
191static void reorder_font_vector (Lisp_Object, struct font *);
192static Lisp_Object fontset_font (Lisp_Object, int, struct face *, int);
193static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object); 187static Lisp_Object make_fontset (Lisp_Object, Lisp_Object, Lisp_Object);
194static Lisp_Object fontset_pattern_regexp (Lisp_Object);
195static void accumulate_script_ranges (Lisp_Object, Lisp_Object,
196 Lisp_Object);
197static void set_fontset_font (Lisp_Object, Lisp_Object);
198 188
199/* Return 1 if ID is a valid fontset id, else return 0. 189/* Return true if ID is a valid fontset id.
200 Optimized away if ENABLE_CHECKING is not defined. */ 190 Optimized away if ENABLE_CHECKING is not defined. */
201 191
202static int 192static bool
203fontset_id_valid_p (int id) 193fontset_id_valid_p (int id)
204{ 194{
205 return (id >= 0 && id < ASIZE (Vfontset_table) - 1); 195 return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
@@ -413,7 +403,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
413 Lisp_Object vec, font_object; 403 Lisp_Object vec, font_object;
414 int size; 404 int size;
415 int i; 405 int i;
416 int score_changed = 0; 406 bool score_changed = 0;
417 407
418 if (font) 408 if (font)
419 XSETFONT (font_object, font); 409 XSETFONT (font_object, font);
@@ -544,10 +534,11 @@ fontset_get_font_group (Lisp_Object fontset, int c)
544 ID is a charset-id that must be preferred, or -1 meaning no 534 ID is a charset-id that must be preferred, or -1 meaning no
545 preference. 535 preference.
546 536
547 If FALLBACK is nonzero, search only fallback fonts. */ 537 If FALLBACK, search only fallback fonts. */
548 538
549static Lisp_Object 539static Lisp_Object
550fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fallback) 540fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id,
541 bool fallback)
551{ 542{
552 Lisp_Object vec, font_group; 543 Lisp_Object vec, font_group;
553 int i, charset_matched = 0, found_index; 544 int i, charset_matched = 0, found_index;
@@ -919,11 +910,11 @@ free_face_fontset (FRAME_PTR f, struct face *face)
919 910
920 911
921#if 0 912#if 0
922/* Return 1 if FACE is suitable for displaying character C. 913/* Return true if FACE is suitable for displaying character C.
923 Otherwise return 0. Called from the macro FACE_SUITABLE_FOR_CHAR_P 914 Called from the macro FACE_SUITABLE_FOR_CHAR_P
924 when C is not an ASCII character. */ 915 when C is not an ASCII character. */
925 916
926int 917bool
927face_suitable_for_char_p (struct face *face, int c) 918face_suitable_for_char_p (struct face *face, int c)
928{ 919{
929 Lisp_Object fontset, rfont_def; 920 Lisp_Object fontset, rfont_def;
@@ -1470,7 +1461,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
1470 Lisp_Object range_list; 1461 Lisp_Object range_list;
1471 struct charset *charset = NULL; 1462 struct charset *charset = NULL;
1472 Lisp_Object fontname; 1463 Lisp_Object fontname;
1473 int ascii_changed = 0; 1464 bool ascii_changed = 0;
1474 1465
1475 fontset = check_fontset_name (name, &frame); 1466 fontset = check_fontset_name (name, &frame);
1476 1467