summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2022-07-31 11:33:05 -0400
committerMatthias Clasen <mclasen@redhat.com>2022-07-31 11:33:05 -0400
commita52044f746a913dd67a1d569ca77897faaaa0697 (patch)
tree10bd3beccca0bda223f421c029bbc58e954dae0b
parent07526cfa7a0508e2f3c27e713185520985fabe70 (diff)
downloadpango-a52044f746a913dd67a1d569ca77897faaaa0697.tar.gz
Fix confusion about tab units
We were mixing up Pango units and pixels here.
-rw-r--r--pango2/pango-line-breaker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pango2/pango-line-breaker.c b/pango2/pango-line-breaker.c
index ed237f48..be0e520b 100644
--- a/pango2/pango-line-breaker.c
+++ b/pango2/pango-line-breaker.c
@@ -689,10 +689,10 @@ get_tab_pos (Pango2LineBreaker *self,
switch (pango2_tab_array_get_positions (self->tabs))
{
case PANGO2_TAB_POSITIONS_DEFAULT:
- tab_unit = PANGO2_SCALE;
+ tab_unit = 1;
break;
case PANGO2_TAB_POSITIONS_PIXELS:
- tab_unit = 1;
+ tab_unit = PANGO2_SCALE;
break;
case PANGO2_TAB_POSITIONS_SPACES:
tab_unit = self->tab_width / 8;
@@ -705,7 +705,7 @@ get_tab_pos (Pango2LineBreaker *self,
else
{
n_tabs = 0;
- tab_unit = PANGO2_SCALE;
+ tab_unit = 1;
*is_default = TRUE;
}