gnu: Add ruby-spinach.
[jackhill/guix/guix.git] / gnu / build / svg.scm
index d9b909c..6f1f4b3 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu build svg)
+  #:use-module (rsvg)
+  #:use-module (cairo)
   #:use-module (srfi srfi-11)
   #:export (svg->png))
 
-;; We need Guile-RSVG and Guile-Cairo.  Load them lazily, at run time, to
-;; allow compilation to proceed.
-(module-use! (current-module) (resolve-interface '(rsvg)))
-(module-use! (current-module) (resolve-interface '(cairo)))
-
 (define* (downscaled-surface surface
                              #:key
                              source-width source-height
@@ -48,7 +45,7 @@ dimensions of IN-SVG."
   (define svg
     (rsvg-handle-new-from-file in-svg))
 
-  (let-values (((origin-width origin-height)
+  (let-values (((origin-width origin-height em ex)
                 (rsvg-handle-get-dimensions svg)))
     (let* ((surf (cairo-image-surface-create 'argb32
                                              origin-width origin-height))