Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ae185452
Commit
ae185452
authored
Feb 25, 2008
by
Kenichi Handa
Browse files
(struct glyph_string): New member padding_p.
parent
de63f07f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
11 deletions
+49
-11
src/ChangeLog
src/ChangeLog
+19
-0
src/dispextern.h
src/dispextern.h
+15
-7
src/xdisp.c
src/xdisp.c
+15
-4
No files found.
src/ChangeLog
View file @
ae185452
2008-02-25 Kenichi Handa <handa@ni.aist.go.jp>
* xdisp.c (fill_glyph_string): Pay attention to glyph->padding_p.
(append_glyph): Set glyph->pixel_width and glyph->padding_p to 1
if the glyph in the font is zero pixel with.
* dispextern.h (struct glyph_string): New member padding_p.
* w32font.c (w32font_draw): Pay attention to s->padding_p.
* ftxfont.c (ftxfont_draw): Pay attention to s->padding_p.
* xfont.c (xfont_draw): Pay attention to s->padding_p.
* xftfont.c (xftfont_draw): Pay attention to s->padding_p.
* font.c: If the font driver doesn't have `shape' function, return
Qnil.
2008-02-25 Jason Rumney <jasonr@gnu.org>
2008-02-25 Jason Rumney <jasonr@gnu.org>
* w32fns.c (enum_font_cb2): Don't use raster fonts for Unicode.
* w32fns.c (enum_font_cb2): Don't use raster fonts for Unicode.
...
...
src/dispextern.h
View file @
ae185452
...
@@ -351,13 +351,16 @@ struct glyph
...
@@ -351,13 +351,16 @@ struct glyph
glyphs above or below it. */
glyphs above or below it. */
unsigned
overlaps_vertically_p
:
1
;
unsigned
overlaps_vertically_p
:
1
;
/* 1 means glyph is a padding glyph. Padding glyphs are used for
/* For terminal frames, 1 means glyph is a padding glyph. Padding
characters whose visual shape consists of more than one glyph
glyphs are used for characters whose visual shape consists of
(e.g. Asian characters). All but the first glyph of such a glyph
more than one glyph (e.g. Asian characters). All but the first
sequence have the padding_p flag set. Only used for terminal
glyph of such a glyph sequence have the padding_p flag set. This
frames, and there only to minimize code changes. A better way
flag is used only to minimize code changes. A better way would
would probably be to use the width field of glyphs to express
probably be to use the width field of glyphs to express padding.
padding. */
For graphic frames, 1 means the pixel width of the glyph in a
font is 0, but 1-pixel is padded on displaying for correct cursor
displaying. The member `pixel_width' above is set to 1. */
unsigned
padding_p
:
1
;
unsigned
padding_p
:
1
;
/* 1 means the actual glyph is not available, draw a box instead.
/* 1 means the actual glyph is not available, draw a box instead.
...
@@ -1197,6 +1200,11 @@ struct glyph_string
...
@@ -1197,6 +1200,11 @@ struct glyph_string
respectively. */
respectively. */
unsigned
for_overlaps
:
3
;
unsigned
for_overlaps
:
3
;
/* 1 means that all glyphs in this glyph string has the flag
padding_p set, and thus must be drawn one by one to have 1-pixel
width even though the logical width in the font is zero. */
unsigned
padding_p
:
1
;
/* The GC to use for drawing this glyph string. */
/* The GC to use for drawing this glyph string. */
#if defined(HAVE_X_WINDOWS) || defined(MAC_OS)
#if defined(HAVE_X_WINDOWS) || defined(MAC_OS)
GC
gc
;
GC
gc
;
...
...
src/xdisp.c
View file @
ae185452
...
@@ -19409,7 +19409,7 @@ fill_glyph_string (s, face_id, start, end, overlaps)
...
@@ -19409,7 +19409,7 @@ fill_glyph_string (s, face_id, start, end, overlaps)
glyph = s->row->glyphs[s->area] + start;
glyph = s->row->glyphs[s->area] + start;
last = s->row->glyphs[s->area] + end;
last = s->row->glyphs[s->area] + end;
voffset = glyph->voffset;
voffset = glyph->voffset;
s->padding_p = glyph->padding_p;
glyph_not_available_p = glyph->glyph_not_available_p;
glyph_not_available_p = glyph->glyph_not_available_p;
while (glyph < last
while (glyph < last
...
@@ -19428,7 +19428,8 @@ fill_glyph_string (s, face_id, start, end, overlaps)
...
@@ -19428,7 +19428,8 @@ fill_glyph_string (s, face_id, start, end, overlaps)
++s->nchars;
++s->nchars;
xassert (s->nchars <= end - start);
xassert (s->nchars <= end - start);
s->width += glyph->pixel_width;
s->width += glyph->pixel_width;
++glyph;
if (glyph++->padding_p != s->padding_p)
break;
}
}
s->font = s->face->font;
s->font = s->face->font;
...
@@ -20181,7 +20182,18 @@ append_glyph (it)
...
@@ -20181,7 +20182,18 @@ append_glyph (it)
{
{
glyph->charpos = CHARPOS (it->position);
glyph->charpos = CHARPOS (it->position);
glyph->object = it->object;
glyph->object = it->object;
glyph->pixel_width = it->pixel_width;
if (it->pixel_width > 0)
{
glyph->pixel_width = it->pixel_width;
glyph->padding_p = 0;
}
else
{
/* Assure at least 1-pixel width. Otherwise, cursor can't
be displayed correctly. */
glyph->pixel_width = 1;
glyph->padding_p = 1;
}
glyph->ascent = it->ascent;
glyph->ascent = it->ascent;
glyph->descent = it->descent;
glyph->descent = it->descent;
glyph->voffset = it->voffset;
glyph->voffset = it->voffset;
...
@@ -20191,7 +20203,6 @@ append_glyph (it)
...
@@ -20191,7 +20203,6 @@ append_glyph (it)
glyph->right_box_line_p = it->end_of_box_run_p;
glyph->right_box_line_p = it->end_of_box_run_p;
glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
glyph->overlaps_vertically_p = (it->phys_ascent > it->ascent
|| it->phys_descent > it->descent);
|| it->phys_descent > it->descent);
glyph->padding_p = 0;
glyph->glyph_not_available_p = it->glyph_not_available_p;
glyph->glyph_not_available_p = it->glyph_not_available_p;
glyph->face_id = it->face_id;
glyph->face_id = it->face_id;
glyph->u.ch = it->char_to_display;
glyph->u.ch = it->char_to_display;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment