Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea
wayland
Commits
ed6aec30
Commit
ed6aec30
authored
Dec 25, 2010
by
Kristian Høgsberg
Browse files
Use cairo_show_glyphs for rendering text
A small step for now.
parent
4554c41b
Changes
1
Hide whitespace changes
Inline
Side-by-side
clients/terminal.c
View file @
ed6aec30
...
...
@@ -656,12 +656,14 @@ terminal_draw_contents(struct terminal *terminal)
int
top_margin
,
side_margin
;
int
row
,
col
;
char
attr
;
char
toShow
[
5
]
=
{
0
,
};
int
border
,
foreground
,
background
,
bold
,
underline
,
tmp
;
int
text_x
,
text_y
;
cairo_surface_t
*
surface
;
double
d
;
struct
terminal_color
color
;
int
num_glyphs
;
cairo_scaled_font_t
*
font
;
cairo_glyph_t
glyphs
[
256
],
*
g
;
window_get_child_rectangle
(
terminal
->
window
,
&
rectangle
);
...
...
@@ -750,8 +752,14 @@ terminal_draw_contents(struct terminal *terminal)
}
cairo_move_to
(
cr
,
text_x
,
text_y
);
memcpy
(
toShow
,
&
terminal_get_row
(
terminal
,
row
)[
col
],
4
);
cairo_show_text
(
cr
,
toShow
);
g
=
glyphs
;
num_glyphs
=
ARRAY_LENGTH
(
glyphs
);
font
=
cairo_get_scaled_font
(
cr
);
cairo_scaled_font_text_to_glyphs
(
font
,
text_x
,
text_y
,
(
char
*
)
&
terminal_get_row
(
terminal
,
row
)[
col
].
byte
,
4
,
&
g
,
&
num_glyphs
,
NULL
,
NULL
,
NULL
);
cairo_show_glyphs
(
cr
,
g
,
num_glyphs
);
}
if
(
terminal
->
show_cursor
&&
!
terminal
->
focused
)
{
...
...
Write
Preview
Supports
Markdown
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