142
142
state->font_weight = PANGO_WEIGHT_NORMAL;
143
143
state->font_stretch = PANGO_STRETCH_NORMAL;
144
144
state->text_dir = PANGO_DIRECTION_LTR;
145
state->text_gravity = PANGO_GRAVITY_SOUTH;
145
146
state->unicode_bidi = UNICODE_BIDI_NORMAL;
146
147
state->text_anchor = TEXT_ANCHOR_START;
147
148
state->letter_spacing = _rsvg_css_parse_length ("0.0");
181
182
state->has_font_stretch = FALSE;
182
183
state->has_font_decor = FALSE;
183
184
state->has_text_dir = FALSE;
185
state->has_text_gravity = FALSE;
184
186
state->has_unicode_bidi = FALSE;
185
187
state->has_text_anchor = FALSE;
186
188
state->has_letter_spacing = FALSE;
302
304
dst->font_decor = src->font_decor;
303
305
if (function (dst->has_text_dir, src->has_text_dir))
304
306
dst->text_dir = src->text_dir;
307
if (function (dst->has_text_gravity, src->has_text_gravity))
308
dst->text_gravity = src->text_gravity;
305
309
if (function (dst->has_unicode_bidi, src->has_unicode_bidi))
306
310
dst->unicode_bidi = src->unicode_bidi;
307
311
if (function (dst->has_text_anchor, src->has_text_anchor))
703
707
} else if (g_str_equal (name, "unicode-bidi")) {
704
708
state->has_unicode_bidi = TRUE;
705
709
if (g_str_equal (value, "inherit")) {
706
state->unicode_bidi = PANGO_DIRECTION_LTR;
710
state->unicode_bidi = UNICODE_BIDI_NORMAL;
707
711
state->has_unicode_bidi = FALSE;
708
712
} else if (g_str_equal (value, "embed"))
709
713
state->unicode_bidi = UNICODE_BIDI_EMBED;
715
719
/* TODO: these aren't quite right... */
717
721
state->has_text_dir = TRUE;
722
state->has_text_gravity = TRUE;
718
723
if (g_str_equal (value, "inherit")) {
719
724
state->text_dir = PANGO_DIRECTION_LTR;
720
725
state->has_text_dir = FALSE;
721
} else if (g_str_equal (value, "lr-tb") || g_str_equal (value, "tb"))
722
state->text_dir = PANGO_DIRECTION_TTB_LTR;
723
else if (g_str_equal (value, "rl"))
726
state->text_gravity = PANGO_GRAVITY_SOUTH;
727
state->has_text_gravity = FALSE;
728
} else if (g_str_equal (value, "lr-tb") || g_str_equal (value, "lr")) {
729
state->text_dir = PANGO_DIRECTION_LTR;
730
state->text_gravity = PANGO_GRAVITY_SOUTH;
731
} else if (g_str_equal (value, "rl-tb") || g_str_equal (value, "rl")) {
724
732
state->text_dir = PANGO_DIRECTION_RTL;
725
else if (g_str_equal (value, "tb-rl") || g_str_equal (value, "rl-tb"))
726
state->text_dir = PANGO_DIRECTION_TTB_RTL;
733
state->text_gravity = PANGO_GRAVITY_SOUTH;
734
} else if (g_str_equal (value, "tb-rl") || g_str_equal (value, "tb")) {
728
735
state->text_dir = PANGO_DIRECTION_LTR;
736
state->text_gravity = PANGO_GRAVITY_EAST;
729
738
} else if (g_str_equal (name, "text-anchor")) {
730
739
state->has_text_anchor = TRUE;
731
740
if (g_str_equal (value, "inherit")) {