[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ace1f32ac1: Fix display of glyphless characters on Haiku
From: |
Po Lu |
Subject: |
master ace1f32ac1: Fix display of glyphless characters on Haiku |
Date: |
Mon, 18 Apr 2022 21:16:01 -0400 (EDT) |
branch: master
commit ace1f32ac1185cad0c43e4b793fe53b54be95161
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix display of glyphless characters on Haiku
* src/haikuterm.c (haiku_draw_glyph_string_foreground): Fix pen
size when drawing composite string w/o font.
(haiku_draw_glyphless_glyph_string_foreground): Correctly
display glyphless character rectangle.
---
src/haikuterm.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/haikuterm.c b/src/haikuterm.c
index 203bfa3f81..9cd1d0f015 100644
--- a/src/haikuterm.c
+++ b/src/haikuterm.c
@@ -1059,6 +1059,8 @@ haiku_draw_glyph_string_foreground (struct glyph_string
*s)
for (i = 0; i < s->nchars; ++i)
{
struct glyph *g = s->first_glyph + i;
+
+ BView_SetPenSize (view, 1);
BView_StrokeRectangle (view, x, s->y, g->pixel_width,
s->height);
x += g->pixel_width;
@@ -1090,6 +1092,7 @@ haiku_draw_glyphless_glyph_string_foreground (struct
glyph_string *s)
unsigned char2b[8];
int x, i, j;
struct face *face = s->face;
+ unsigned long color;
/* If first glyph of S has a left box line, start drawing the text
of S to the right of that box line. */
@@ -1153,11 +1156,21 @@ haiku_draw_glyphless_glyph_string_foreground (struct
glyph_string *s)
s->ybase + glyph->slice.glyphless.lower_yoff,
false);
}
+
if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE)
- BView_FillRectangle (FRAME_HAIKU_VIEW (s->f),
- x, s->ybase - glyph->ascent,
- glyph->pixel_width - 1,
- glyph->ascent + glyph->descent - 1);
+ {
+ if (s->hl == DRAW_CURSOR)
+ haiku_merge_cursor_foreground (s, NULL, &color);
+ else
+ color = s->face->foreground;
+
+ BView_SetHighColor (FRAME_HAIKU_VIEW (s->f), color);
+ BView_SetPenSize (FRAME_HAIKU_VIEW (s->f), 1);
+ BView_StrokeRectangle (FRAME_HAIKU_VIEW (s->f),
+ x, s->ybase - glyph->ascent,
+ glyph->pixel_width - 1,
+ glyph->ascent + glyph->descent - 1);
+ }
x += glyph->pixel_width;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ace1f32ac1: Fix display of glyphless characters on Haiku,
Po Lu <=