diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-03-09 14:57:42 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-03-09 14:59:26 -0500 |
commit | 79454ac56cef1baf49acc7c556cf059d3cbbfad3 (patch) | |
tree | 5e649a97082bed4e06c65a9a17450e40c177b6c7 /utils | |
parent | ddbeda2bda43e9e84df380ca1d4c39eb2819475b (diff) | |
download | pango-79454ac56cef1baf49acc7c556cf059d3cbbfad3.tar.gz |
Drop the hb-glib dependency again
It is not really needed.
Fixes: #674
Diffstat (limited to 'utils')
-rw-r--r-- | utils/viewer-pangocairo.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c index 537174aa..ae5813bb 100644 --- a/utils/viewer-pangocairo.c +++ b/utils/viewer-pangocairo.c @@ -27,7 +27,6 @@ #include <pango/pangocairo.h> #include <hb-ot.h> -#include <hb-glib.h> static int opt_annotate = 0; @@ -350,7 +349,7 @@ render_callback (PangoLayout *layout, if (baseline_tag == 0) { - hb_script_t script = hb_glib_script_to_script (run->item->analysis.script); + hb_script_t script = (hb_script_t) g_unicode_script_to_iso15924 (run->item->analysis.script); if (run->item->analysis.flags & PANGO_ANALYSIS_FLAG_CENTERED_BASELINE) baseline_tag = HB_OT_LAYOUT_BASELINE_TAG_IDEO_EMBOX_CENTRAL; @@ -366,13 +365,15 @@ render_callback (PangoLayout *layout, dir = HB_DIRECTION_TTB; else dir = HB_DIRECTION_LTR; - script = hb_glib_script_to_script (run->item->analysis.script); + script = (hb_script_t) g_unicode_script_to_iso15924 (run->item->analysis.script); lang = HB_TAG_NONE; for (int i = 0; i < G_N_ELEMENTS (baselines); i++) { char buf[5] = { 0, }; + hb_tag_to_string (baselines[i], buf); + cairo_save (cr); if (baselines[i] == baseline_tag) @@ -386,7 +387,10 @@ render_callback (PangoLayout *layout, script, lang, &coord)) - cairo_set_dash (cr, NULL, 0, 0); + { + g_print ("baseline %s, value %d\n", buf, coord); + cairo_set_dash (cr, NULL, 0, 0); + } else { double dashes[] = { 4 * lw, 4 * lw }; @@ -398,6 +402,7 @@ render_callback (PangoLayout *layout, lang, &coord); + g_print ("baseline %s, fallback value %d\n", buf, coord); cairo_set_dash (cr, dashes, 2, 0); cairo_set_line_cap (cr, CAIRO_LINE_CAP_SQUARE); } @@ -410,7 +415,6 @@ render_callback (PangoLayout *layout, cairo_move_to (cr, (double)rect.x / PANGO_SCALE - 5, (double)(y - coord) / PANGO_SCALE - 5); - hb_tag_to_string (baselines[i], buf); cairo_show_text (cr, buf); cairo_restore (cr); |