1. 17 Aug, 2019 1 commit
  2. 13 Aug, 2019 1 commit
  3. 30 Jul, 2019 2 commits
  4. 29 Jul, 2019 3 commits
  5. 01 Jul, 2019 1 commit
    • Federico Mena Quintero's avatar
      (#481): Length::parse() - don't expect_exhausted() · b53df7d8
      Federico Mena Quintero authored
      This makes me somewhat concerned, since it means that somewhere in the
      callers we should probably do expect_exhausted(), but we aren't doing
      it currently.
      
      The specific problem here is that in an SVG with
      
        <tspan x="2209 2903 3394 3792 4190 4626 5117" y="18611" id="tspan1053">Current</tspan>
      
      i.e. a tspan with multiple positions in the "x" attribute, the whole
      attribute yields a parse error because there is extra stuff after the
      initial 2209.
      
      While the text-related elements should realy parse a list of Length
      for their x/y/dx/dy attributes, we'll use this little hack for now:
      let there be extra data after a length value, so at least the first
      value goes through.
      
      Fixes GNOME/librsvg#481
      b53df7d8
  6. 04 Jun, 2019 1 commit
  7. 31 May, 2019 1 commit
  8. 24 May, 2019 1 commit
  9. 09 May, 2019 1 commit
  10. 28 Mar, 2019 1 commit
  11. 27 Mar, 2019 2 commits
  12. 20 Mar, 2019 1 commit
  13. 08 Mar, 2019 1 commit
  14. 07 Mar, 2019 1 commit
    • Federico Mena Quintero's avatar
      (#433): Use the old logic when measuring geometries · d0b0da25
      Federico Mena Quintero authored
      The old logic of passing magic viewports/vboxes when measuring
      geometries is incompatible with the new logic of doing everything with
      respect to the caller's viewport.
      
      So, to keep the old-style geometries working, this makes *that* a
      special case.  DrawingCtx::new() now takes a "measuring" boolean
      argument, and NodeSvg::draw() checks it when setting up its
      viewport/vbox.
      
      This looks like a hack, but I want to think of it as
      behavior-preserving code that just hasn't been refactored yet.
      
      A bunch of test files jiggled a bit as a result of the new rendering
      logic; I verified them by hand and regenerated them.
      
      Fixes #433
      d0b0da25
  15. 06 Mar, 2019 1 commit
  16. 26 Feb, 2019 1 commit
    • Federico Mena Quintero's avatar
      render_to_pixbuf_at_size(): Handle a zero size by returning an empty pixbuf · c1e064b6
      Federico Mena Quintero authored
      SharedImageSurface: disallow creating with a zero-sized Cairo surface
      
      gdk_pixbuf_get_file_info() uses a GdkPixbufLoader, but in its
      "size-prepared" callback it saves the computed size, and then calls
      gdk_pixbuf_loader_set_size(loader, 0, 0).  Presumably it does to tell
      loaders that it only wanted to know the size, but that they shouldn't
      decode or render the image to a pixbuf buffer.
      
      Librsvg used to panic when getting (0, 0) from the size_callback:
      
      - Handle.get_dimensions() would return (0, 0)
      
      - Handle.get_pixbuf_sub() would create an ImageSurface of size (0, 0),
        which is valid in Cairo's terms.
      
      - But SharedImageSurface used to do
      
          data_ptr = NonNull::new(cairo_image_surface_get_data(...)).unwrap()
      
        which panics when cairo_image_surface_get_data() returs NULL.  This
        is not even guaranteed; I think cairo just passes the (0, 0) down to
        pixman, and pixman ends up doing malloc(0), whose result is
        implementation-defined.  Thus, we can't guarantee that NonNull will
        work.  The caller has to be responsible for not creating zero-sized
        shared surfaces.
      c1e064b6
  17. 23 Feb, 2019 2 commits
    • Paolo Borelli's avatar
      (#425) Use the test font map for the dimensions unit test · 3c84d67c
      Paolo Borelli authored
      Set up the test font map so that the test does not depend on the
      system settings. This avoids the test failure for the
      "/dimensions/sub/text_position" unit test on ubuntu.
      3c84d67c
    • Paolo Borelli's avatar
      (#425): set LANGUAGE for the tests · 1dd17e51
      Paolo Borelli authored
      The LC_ALL env var does not override LANGUAGE. Set them both for
      the test so that we have a known environement.
      This fixes the remaining systemLanguage test reported in gitlab#425.
      Also add the trailig ":" so that we test the same case.
      1dd17e51
  18. 22 Feb, 2019 1 commit
  19. 19 Feb, 2019 1 commit
    • Federico Mena Quintero's avatar
      Don't recurse into get_dimensions() from get_node_geometry() · bb68856d
      Federico Mena Quintero authored
      As an experiment to remove this recursion, this commit does a few
      things:
      
      * Makes get_node_geometry() not call get_dimensions().  This was a
        semi-recursive call when the toplevel SVG has
        width/height="100%" (or any other percentage-based size), and no
        viewBox.  Instead, start with a 1x1 viewport that matches the
        temporary surface used to run the rendering/measuring loop.
      
      * Make the case where an SVG has no dimensions (no width/height, no
        viewBox, no objects at all) *not* a rendering error.  Remove
        RenderingError::SvgHasNoSize and just render nothing.
      
      This also makes tests/render-crash not check the result of
      rsvg_handle_render_cairo().
      
      We are just checking whether the rendering doesn't crash; not that
      files actually render without errors.
      
      For the same reason, don't even try to figure out the SVG's
      dimensions; just render to a constant-sized surface.
      bb68856d
  20. 15 Feb, 2019 2 commits
  21. 26 Jan, 2019 1 commit
    • Federico Mena Quintero's avatar
      Revert the subclass branch temporarily · 21efded1
      Federico Mena Quintero authored
      BuildStream's vendoring doesn't deal with arbitrarily referenced
      repositories; because of "cargo vendor" it depends on crates that come
      from crates.io.  Since the subclass branch depends on glib-rs master,
      we'll revert this whole branch temporarily until glib-rs makes a
      release.
      
      (I can't force-push to master a clean revert, hence this revert-changes commit)
      
      Reverts merge a8f9996e
      21efded1
  22. 24 Jan, 2019 1 commit
  23. 23 Jan, 2019 1 commit
  24. 10 Jan, 2019 1 commit
  25. 09 Jan, 2019 1 commit
  26. 08 Jan, 2019 3 commits
  27. 05 Jan, 2019 1 commit
    • Paolo Borelli's avatar
      handle: move the whole fontmap hack to tests · 2cb8f6ba
      Paolo Borelli authored
      There is no reason to set the default fontmap from within handle.
      Setting the default fontmap is part of setting up the text fixture
      and can live in test-utils. Beside we do not need to hold on to
      the fontmap pointer, since setting by the default pango keeps its
      own reference.
      2cb8f6ba
  28. 02 Jan, 2019 1 commit
  29. 01 Jan, 2019 1 commit
  30. 29 Dec, 2018 1 commit
  31. 28 Dec, 2018 2 commits