diff options
| author | Matthias Clasen <mclasen@redhat.com> | 2021-09-03 07:19:36 -0400 |
|---|---|---|
| committer | Matthias Clasen <mclasen@redhat.com> | 2021-09-03 12:52:05 -0400 |
| commit | 299c7c35148e49369c151aa4eae6066d09e9d4b4 (patch) | |
| tree | dab6f0a12536b820ebf366645752a85db81e571c | |
| parent | 6599cb001fa184ed224c655519d659f168e9face (diff) | |
| download | gtk+-299c7c35148e49369c151aa4eae6066d09e9d4b4.tar.gz | |
gsk: Pass font options along
Use the font options from the text node when
looking up glyphs.
| -rw-r--r-- | gsk/ngl/gsknglrenderjob.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gsk/ngl/gsknglrenderjob.c b/gsk/ngl/gsknglrenderjob.c index 4b04310e66..719b9da0dc 100644 --- a/gsk/ngl/gsknglrenderjob.c +++ b/gsk/ngl/gsknglrenderjob.c @@ -2875,9 +2875,16 @@ gsk_ngl_render_job_visit_text_node (GskNglRenderJob *job, rgba_to_half (color, cc); + /* We have 23 bits in the key for the scale */ + g_assert (text_scale * 1024 < (1 << 24)); + lookup.font = (PangoFont *)font; lookup.scale = (guint) (text_scale * 1024); + lookup.hint_metrics = gsk_text_node_get_hint_metrics (node); + lookup.antialias = gsk_text_node_get_antialias (node); + lookup.hint_style = gsk_text_node_get_hint_style (node); + yshift = compute_phase_and_pos (y, &ypos); gsk_ngl_render_job_begin_draw (job, CHOOSE_PROGRAM (job, coloring)); |
