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
57b03282
Commit
57b03282
authored
Apr 07, 1997
by
Kenichi Handa
Browse files
(dumpglyphs): Clip and highlight glyphs displayed with
fonts of wrong size.
parent
3fdc9c8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
src/xterm.c
src/xterm.c
+16
-16
No files found.
src/xterm.c
View file @
57b03282
...
...
@@ -607,7 +607,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
|| (cmpcharp == NULL && FAST_GLYPH_FACE (g) != cf))
break;
if (c2)
if (c2
> 0
)
cp->byte1 = c1, cp->byte2 = c2;
else
cp->byte1 = 0, cp->byte2 = c1;
...
...
@@ -629,7 +629,8 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
int line_height = f->output_data.x->line_height;
/* Pixel width of each glyph in this run. */
int glyph_width
= FONT_WIDTH (f->output_data.x->font) * CHARSET_WIDTH (charset);
= (FONT_WIDTH (f->output_data.x->font)
* (cmpcharp ? cmpcharp->width : CHARSET_WIDTH (charset)));
/* Overall pixel width of this run. */
int run_width
= (FONT_WIDTH (f->output_data.x->font)
...
...
@@ -681,6 +682,8 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
stippled = 1;
}
#define FACE_DEFAULT (~0)
/* Setting appropriate font and gc for this charset. */
if (charset != CHARSET_ASCII)
{
...
...
@@ -745,21 +748,20 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
else
{
font = FACE_FONT (face);
if (font == (XFontStruct *) FACE_DEFAULT)
font = f->output_data.x->font;
baseline = FONT_BASE (font);
font_not_found:
gc
= FACE_GC (face);
gc = FACE_GC (face);
}
#define FACE_DEFAULT (~0)
/* Now override that if the cursor's on this character. */
if (hl == 2)
{
/* The cursor overrides stippling. */
stippled = 0;
if ((font == (XFontStruct *) FACE_DEFAULT
|| font == f->output_data.x->font)
if (font == f->output_data.x->font
&& face->background == f->output_data.x->background_pixel
&& face->foreground == f->output_data.x->foreground_pixel)
{
...
...
@@ -811,13 +813,12 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
}
}
if (font == (XFontStruct *) FACE_DEFAULT)
font = f->output_data.x->font;
if (font)
require_clipping = (FONT_HEIGHT (font) > line_height
|| FONT_WIDTH (font) > glyph_width
|| baseline != f->output_data.x->font_baseline);
require_clipping = (!NILP (Vclip_large_size_font)
&& (font->ascent > baseline
|| font->descent > line_height - baseline
|| (!cmpcharp
&& FONT_WIDTH (font) > glyph_width)));
if (font && (just_foreground || (cmpcharp && gidx > 0)))
background_filled = 1;
...
...
@@ -838,7 +839,6 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
else if (!font
|| FONT_HEIGHT (font) < line_height
|| FONT_WIDTH (font) < glyph_width
|| baseline != f->output_data.x->font_baseline
|| cmpcharp)
{
/* Fill a area for the current run in background pixle of GC. */
...
...
@@ -849,7 +849,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
/* The current code at first exchange foreground and
background of GC, fill the area, then recover the
original foreground and background of GC.
Aren't there more smart ways? */
Aren't there
any
more smart ways? */
XGetGCValues (FRAME_X_DISPLAY (f), gc, mask, &xgcv);
fore = xgcv.foreground, back = xgcv.background;
...
...
@@ -1017,7 +1017,7 @@ dumpglyphs (f, left, top, gp, n, hl, just_foreground, cmpcharp)
}
#endif
}
if (!font || require_clipping)
if (!font || require_clipping
&& !NILP (Vhighlight_wrong_size_font)
)
{
/* Show rectangles to show that we found no font or a font
of inappropriate size. */
...
...
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