Mercurial > emacs
changeset 91043:3807f7a342ae
src/xdisp.c: Remove extraneous definition of get_glyph_face_and_encoding.
@
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-259
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 12 Oct 2007 01:09:30 +0000 |
parents | 0efcd228da1f |
children | 762f55e106a2 |
files | src/xdisp.c |
diffstat | 1 files changed, 0 insertions(+), 74 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Thu Oct 11 16:24:58 2007 +0000 +++ b/src/xdisp.c Fri Oct 12 01:09:30 2007 +0000 @@ -19037,80 +19037,6 @@ } -/* Get face and two-byte form of character C in face FACE_ID on frame - F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero - means we want to display multibyte text. DISPLAY_P non-zero means - make sure that X resources for the face returned are allocated. - Value is a pointer to a realized face that is ready for display if - DISPLAY_P is non-zero. */ - -static INLINE struct face * -get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p) - struct frame *f; - int c, face_id; - XChar2b *char2b; - int multibyte_p, display_p; -{ - struct face *face = FACE_FROM_ID (f, face_id); - -#ifdef USE_FONT_BACKEND - if (enable_font_backend) - { - struct font *font = (struct font *) face->font_info; - - if (font) - { - unsigned code = font->driver->encode_char (font, c); - - if (code != FONT_INVALID_CODE) - STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); - else - STORE_XCHAR2B (char2b, 0, 0); - } - } - else -#endif /* USE_FONT_BACKEND */ - if (!multibyte_p) - { - /* Unibyte case. We don't have to encode, but we have to make - sure to use a face suitable for unibyte. */ - STORE_XCHAR2B (char2b, 0, c); - face_id = FACE_FOR_CHAR (f, face, c, -1, Qnil); - face = FACE_FROM_ID (f, face_id); - } - else if (c < 128) - { - /* Case of ASCII in a face known to fit ASCII. */ - STORE_XCHAR2B (char2b, 0, c); - } - else if (face->font != NULL) - { - struct font_info *font_info - = FONT_INFO_FROM_ID (f, face->font_info_id); - struct charset *charset = CHARSET_FROM_ID (font_info->charset); - unsigned code = ENCODE_CHAR (charset, c); - - if (CHARSET_DIMENSION (charset) == 1) - STORE_XCHAR2B (char2b, 0, code); - else - STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF)); - /* Maybe encode the character in *CHAR2B. */ - FRAME_RIF (f)->encode_char (c, char2b, font_info, charset, NULL); - } - - /* Make sure X resources of the face are allocated. */ -#ifdef HAVE_X_WINDOWS - if (display_p) -#endif - { - xassert (face != NULL); - PREPARE_FACE_FOR_DISPLAY (f, face); - } - - return face; -} - - /* Get face and two-byte form of character glyph GLYPH on frame F. The encoding of GLYPH->u.ch is returned in *CHAR2B. Value is a pointer to a realized face that is ready for display. */