aboutsummaryrefslogtreecommitdiffstats
path: root/src/font.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/font.h')
-rw-r--r--src/font.h45
1 files changed, 18 insertions, 27 deletions
diff --git a/src/font.h b/src/font.h
index 3b90bc2ab8a..0475eb665dd 100644
--- a/src/font.h
+++ b/src/font.h
@@ -320,19 +320,10 @@ struct font
320 negative if that information is not in the font. */ 320 negative if that information is not in the font. */
321 int underline_position; 321 int underline_position;
322 322
323 /* 1 if `vertical-centering-font-regexp' matches this font name. 323 /* True if `vertical-centering-font-regexp' matches this font name.
324 In this case, we render characters at vertical center positions 324 In this case, we render characters at vertical center positions
325 of lines. */ 325 of lines. */
326 int vertical_centering; 326 bool vertical_centering;
327
328 /* Encoding type of the font. The value is one of
329 0, 1, 2, or 3:
330 0: code points 0x20..0x7F or 0x2020..0x7F7F are used
331 1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used
332 2: code points 0x20A0..0x7FFF are used
333 3: code points 0xA020..0xFF7F are used
334 If the member `font_encoder' is not NULL, this member is ignored. */
335 unsigned char encoding_type;
336 327
337 /* The baseline position of a font is normally `ascent' value of the 328 /* The baseline position of a font is normally `ascent' value of the
338 font. However, there exist many fonts which don't set `ascent' to 329 font. However, there exist many fonts which don't set `ascent' to
@@ -506,9 +497,9 @@ struct font_driver
506 /* Symbol indicating the type of the font-driver. */ 497 /* Symbol indicating the type of the font-driver. */
507 Lisp_Object type; 498 Lisp_Object type;
508 499
509 /* 1 iff the font's foundry, family, and adstyle names are case 500 /* True iff the font's foundry, family, and adstyle names are case
510 sensitive. */ 501 sensitive. */
511 int case_sensitive; 502 bool case_sensitive;
512 503
513 /* Return a cache of font-entities on frame F. The cache must be a 504 /* Return a cache of font-entities on frame F. The cache must be a
514 cons whose cdr part is the actual cache area. */ 505 cons whose cdr part is the actual cache area. */
@@ -592,11 +583,11 @@ struct font_driver
592 583
593 /* Optional. 584 /* Optional.
594 Draw glyphs between FROM and TO of S->char2b at (X Y) pixel 585 Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
595 position of frame F with S->FACE and S->GC. If WITH_BACKGROUND 586 position of frame F with S->FACE and S->GC. If WITH_BACKGROUND,
596 is nonzero, fill the background in advance. It is assured that 587 fill the background in advance. It is assured that WITH_BACKGROUND
597 WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */ 588 is false when (FROM > 0 || TO < S->nchars). */
598 int (*draw) (struct glyph_string *s, int from, int to, 589 int (*draw) (struct glyph_string *s, int from, int to,
599 int x, int y, int with_background); 590 int x, int y, bool with_background);
600 591
601 /* Optional. 592 /* Optional.
602 Store bitmap data for glyph-code CODE of FONT in BITMAP. It is 593 Store bitmap data for glyph-code CODE of FONT in BITMAP. It is
@@ -648,7 +639,7 @@ struct font_driver
648 short, return -1. */ 639 short, return -1. */
649 int (*otf_drive) (struct font *font, Lisp_Object features, 640 int (*otf_drive) (struct font *font, Lisp_Object features,
650 Lisp_Object gstring_in, int from, int to, 641 Lisp_Object gstring_in, int from, int to,
651 Lisp_Object gstring_out, int idx, int alternate_subst); 642 Lisp_Object gstring_out, int idx, bool alternate_subst);
652 643
653 /* Optional. 644 /* Optional.
654 Make the font driver ready for frame F. Usually this function 645 Make the font driver ready for frame F. Usually this function
@@ -699,9 +690,9 @@ struct font_driver
699 690
700 Return non-zero if FONT_OBJECT can be used as a (cached) font 691 Return non-zero if FONT_OBJECT can be used as a (cached) font
701 for ENTITY on frame F. */ 692 for ENTITY on frame F. */
702 int (*cached_font_ok) (struct frame *f, 693 bool (*cached_font_ok) (struct frame *f,
703 Lisp_Object font_object, 694 Lisp_Object font_object,
704 Lisp_Object entity); 695 Lisp_Object entity);
705}; 696};
706 697
707 698
@@ -711,9 +702,9 @@ struct font_driver
711 702
712struct font_driver_list 703struct font_driver_list
713{ 704{
714 /* 1 iff this driver is currently used. It is ignored in the global 705 /* True iff this driver is currently used. It is ignored in the global
715 font driver list.*/ 706 font driver list.*/
716 int on; 707 bool on;
717 /* Pointer to the font driver. */ 708 /* Pointer to the font driver. */
718 struct font_driver *driver; 709 struct font_driver *driver;
719 /* Pointer to the next element of the chain. */ 710 /* Pointer to the next element of the chain. */
@@ -744,12 +735,12 @@ extern Lisp_Object find_font_encoding (Lisp_Object);
744extern int font_registry_charsets (Lisp_Object, struct charset **, 735extern int font_registry_charsets (Lisp_Object, struct charset **,
745 struct charset **); 736 struct charset **);
746extern int font_style_to_value (enum font_property_index prop, 737extern int font_style_to_value (enum font_property_index prop,
747 Lisp_Object name, int noerror); 738 Lisp_Object name, bool noerror);
748extern Lisp_Object font_style_symbolic (Lisp_Object font, 739extern Lisp_Object font_style_symbolic (Lisp_Object font,
749 enum font_property_index prop, 740 enum font_property_index prop,
750 int for_face); 741 bool for_face);
751 742
752extern int font_match_p (Lisp_Object spec, Lisp_Object font); 743extern bool font_match_p (Lisp_Object spec, Lisp_Object font);
753extern Lisp_Object font_list_entities (Lisp_Object frame, 744extern Lisp_Object font_list_entities (Lisp_Object frame,
754 Lisp_Object spec); 745 Lisp_Object spec);
755 746
@@ -774,7 +765,7 @@ extern Lisp_Object font_open_by_spec (FRAME_PTR f, Lisp_Object spec);
774extern Lisp_Object font_open_by_name (FRAME_PTR f, Lisp_Object name); 765extern Lisp_Object font_open_by_name (FRAME_PTR f, Lisp_Object name);
775 766
776extern Lisp_Object font_intern_prop (const char *str, ptrdiff_t len, 767extern Lisp_Object font_intern_prop (const char *str, ptrdiff_t len,
777 int force_symbol); 768 bool force_symbol);
778extern void font_update_sort_order (int *order); 769extern void font_update_sort_order (int *order);
779 770
780extern void font_parse_family_registry (Lisp_Object family, 771extern void font_parse_family_registry (Lisp_Object family,