aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiles Bader2007-10-12 01:09:30 +0000
committerMiles Bader2007-10-12 01:09:30 +0000
commitd0f356c5ae1bcd45175e74b4c827f0dc695ba0de (patch)
treed70b309e0f47a4db513b655504e859027821f9f8 /src
parentc73bd236f75b742ad4642ec94798987ae6e3e1e8 (diff)
downloademacs-d0f356c5ae1bcd45175e74b4c827f0dc695ba0de.tar.gz
emacs-d0f356c5ae1bcd45175e74b4c827f0dc695ba0de.zip
src/xdisp.c: Remove extraneous definition of get_glyph_face_and_encoding.
@ Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-259
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index e146fde4c16..584ebea49f2 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19037,80 +19037,6 @@ append_glyph_string (head, tail, s)
19037} 19037}
19038 19038
19039 19039
19040/* Get face and two-byte form of character C in face FACE_ID on frame
19041 F. The encoding of C is returned in *CHAR2B. MULTIBYTE_P non-zero
19042 means we want to display multibyte text. DISPLAY_P non-zero means
19043 make sure that X resources for the face returned are allocated.
19044 Value is a pointer to a realized face that is ready for display if
19045 DISPLAY_P is non-zero. */
19046
19047static INLINE struct face *
19048get_char_face_and_encoding (f, c, face_id, char2b, multibyte_p, display_p)
19049 struct frame *f;
19050 int c, face_id;
19051 XChar2b *char2b;
19052 int multibyte_p, display_p;
19053{
19054 struct face *face = FACE_FROM_ID (f, face_id);
19055
19056#ifdef USE_FONT_BACKEND
19057 if (enable_font_backend)
19058 {
19059 struct font *font = (struct font *) face->font_info;
19060
19061 if (font)
19062 {
19063 unsigned code = font->driver->encode_char (font, c);
19064
19065 if (code != FONT_INVALID_CODE)
19066 STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF));
19067 else
19068 STORE_XCHAR2B (char2b, 0, 0);
19069 }
19070 }
19071 else
19072#endif /* USE_FONT_BACKEND */
19073 if (!multibyte_p)
19074 {
19075 /* Unibyte case. We don't have to encode, but we have to make
19076 sure to use a face suitable for unibyte. */
19077 STORE_XCHAR2B (char2b, 0, c);
19078 face_id = FACE_FOR_CHAR (f, face, c, -1, Qnil);
19079 face = FACE_FROM_ID (f, face_id);
19080 }
19081 else if (c < 128)
19082 {
19083 /* Case of ASCII in a face known to fit ASCII. */
19084 STORE_XCHAR2B (char2b, 0, c);
19085 }
19086 else if (face->font != NULL)
19087 {
19088 struct font_info *font_info
19089 = FONT_INFO_FROM_ID (f, face->font_info_id);
19090 struct charset *charset = CHARSET_FROM_ID (font_info->charset);
19091 unsigned code = ENCODE_CHAR (charset, c);
19092
19093 if (CHARSET_DIMENSION (charset) == 1)
19094 STORE_XCHAR2B (char2b, 0, code);
19095 else
19096 STORE_XCHAR2B (char2b, (code >> 8), (code & 0xFF));
19097 /* Maybe encode the character in *CHAR2B. */
19098 FRAME_RIF (f)->encode_char (c, char2b, font_info, charset, NULL);
19099 }
19100
19101 /* Make sure X resources of the face are allocated. */
19102#ifdef HAVE_X_WINDOWS
19103 if (display_p)
19104#endif
19105 {
19106 xassert (face != NULL);
19107 PREPARE_FACE_FOR_DISPLAY (f, face);
19108 }
19109
19110 return face;
19111}
19112
19113
19114/* Get face and two-byte form of character glyph GLYPH on frame F. 19040/* Get face and two-byte form of character glyph GLYPH on frame F.
19115 The encoding of GLYPH->u.ch is returned in *CHAR2B. Value is 19041 The encoding of GLYPH->u.ch is returned in *CHAR2B. Value is
19116 a pointer to a realized face that is ready for display. */ 19042 a pointer to a realized face that is ready for display. */