~ubuntu-branches/ubuntu/quantal/librsvg/quantal

« back to all changes in this revision

Viewing changes to rsvg-styles.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2012-01-24 15:26:18 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20120124152618-3casq466os1cz56e
Tags: 2.35.1-0ubuntu1
* New upstream release (LP: #920796)
* debian/patches/98_revert-abi-break.patch:
  Git patch to undo ABI break

Show diffs side-by-side

added added

removed removed

Lines of Context:
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... */
716
720
 
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;
727
 
        else
 
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;
 
737
        }
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")) {