aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2013-12-04 17:08:30 +0400
committerDmitry Antipov2013-12-04 17:08:30 +0400
commita378aa9de73b402c231b562a16c6e46c91f420cf (patch)
tree5f9cf232e3982a123ebb690e914b979a971cbdd8 /src
parent8497f93806be83e1fc8e496c1134c6e1680fea29 (diff)
downloademacs-a378aa9de73b402c231b562a16c6e46c91f420cf.tar.gz
emacs-a378aa9de73b402c231b562a16c6e46c91f420cf.zip
* font.c (font_list_entities): Remove dummy assignment.
* font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are used on graphic displays only. Remove unused 'font_encoder' member. * nsfont.m (nsfont_open): * w32font.c (w32font_open_internal): Adjust users.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/font.c2
-rw-r--r--src/font.h15
-rw-r--r--src/nsfont.m1
-rw-r--r--src/w32font.c1
5 files changed, 18 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f7ed14c1f40..a7e758539f4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
2
3 * font.c (font_list_entities): Remove dummy assignment.
4 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
5 used on graphic displays only. Remove unused 'font_encoder' member.
6 * nsfont.m (nsfont_open):
7 * w32font.c (w32font_open_internal): Adjust users.
8
12013-12-03 Paul Eggert <eggert@cs.ucla.edu> 92013-12-03 Paul Eggert <eggert@cs.ucla.edu>
2 10
3 Use bool for boolean. 11 Use bool for boolean.
diff --git a/src/font.c b/src/font.c
index 1e1670b21af..ad604ebe744 100644
--- a/src/font.c
+++ b/src/font.c
@@ -2718,7 +2718,7 @@ font_list_entities (struct frame *f, Lisp_Object spec)
2718 ASET (scratch_font_spec, FONT_SPACING_INDEX, AREF (spec, FONT_SPACING_INDEX)); 2718 ASET (scratch_font_spec, FONT_SPACING_INDEX, AREF (spec, FONT_SPACING_INDEX));
2719 ASET (scratch_font_spec, FONT_EXTRA_INDEX, AREF (spec, FONT_EXTRA_INDEX)); 2719 ASET (scratch_font_spec, FONT_EXTRA_INDEX, AREF (spec, FONT_EXTRA_INDEX));
2720 2720
2721 for (i = 0; driver_list; driver_list = driver_list->next) 2721 for (; driver_list; driver_list = driver_list->next)
2722 if (driver_list->on 2722 if (driver_list->on
2723 && (NILP (ftype) || EQ (driver_list->driver->type, ftype))) 2723 && (NILP (ftype) || EQ (driver_list->driver->type, ftype)))
2724 { 2724 {
diff --git a/src/font.h b/src/font.h
index 1f2f9bfbb19..9928fb3196d 100644
--- a/src/font.h
+++ b/src/font.h
@@ -312,6 +312,10 @@ struct font
312 /* Ascent and descent of the font (in pixels). */ 312 /* Ascent and descent of the font (in pixels). */
313 int ascent, descent; 313 int ascent, descent;
314 314
315 /* The following members makes sense on graphic displays only. */
316
317#if defined (HAVE_WINDOW_SYSTEM)
318
315 /* Vertical pixel width of the underline. If is zero if that 319 /* Vertical pixel width of the underline. If is zero if that
316 information is not in the font. */ 320 information is not in the font. */
317 int underline_thickness; 321 int underline_thickness;
@@ -374,12 +378,6 @@ struct font
374 registered in char-table `use-default-ascent'. */ 378 registered in char-table `use-default-ascent'. */
375 int default_ascent; 379 int default_ascent;
376 380
377 /* CCL program to calculate code points of the font. */
378 struct ccl_program *font_encoder;
379
380 /* Font-driver for the font. */
381 struct font_driver *driver;
382
383 /* Charset to encode a character code into a glyph code of the font. 381 /* Charset to encode a character code into a glyph code of the font.
384 -1 means that the font doesn't require this information to encode 382 -1 means that the font doesn't require this information to encode
385 a character. */ 383 a character. */
@@ -390,6 +388,11 @@ struct font
390 determine it. */ 388 determine it. */
391 int repertory_charset; 389 int repertory_charset;
392 390
391#endif /* HAVE_WINDOW_SYSTEM */
392
393 /* Font-driver for the font. */
394 struct font_driver *driver;
395
393 /* There are more members in this structure, but they are private 396 /* There are more members in this structure, but they are private
394 to the font-driver. */ 397 to the font-driver. */
395}; 398};
diff --git a/src/nsfont.m b/src/nsfont.m
index 58663804a2f..0f546408316 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -829,7 +829,6 @@ nsfont_open (struct frame *f, Lisp_Object font_entity, int pixel_size)
829 font->vertical_centering = 0; 829 font->vertical_centering = 0;
830 font->baseline_offset = 0; 830 font->baseline_offset = 0;
831 font->relative_compose = 0; 831 font->relative_compose = 0;
832 font->font_encoder = NULL;
833 832
834 font->props[FONT_FORMAT_INDEX] = Qns; 833 font->props[FONT_FORMAT_INDEX] = Qns;
835 font->props[FONT_FILE_INDEX] = Qnil; 834 font->props[FONT_FILE_INDEX] = Qnil;
diff --git a/src/w32font.c b/src/w32font.c
index 923c71b1147..654e0d9cae4 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -1012,7 +1012,6 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
1012 font->baseline_offset = 0; 1012 font->baseline_offset = 0;
1013 font->relative_compose = 0; 1013 font->relative_compose = 0;
1014 font->default_ascent = w32_font->metrics.tmAscent; 1014 font->default_ascent = w32_font->metrics.tmAscent;
1015 font->font_encoder = NULL;
1016 font->pixel_size = size; 1015 font->pixel_size = size;
1017 font->driver = &w32font_driver; 1016 font->driver = &w32font_driver;
1018 /* Use format cached during list, as the information we have access to 1017 /* Use format cached during list, as the information we have access to