[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improvements for the SVG backend

From: pnorcks
Subject: Re: Improvements for the SVG backend
Date: Tue, 07 Jul 2009 21:10:54 +0000

Reviewers: joeneeman,

Thanks for your review, Joe.

On 2009/07/07 18:32:44, joeneeman wrote:
File scm/output-svg.scm (right):
Line 140: (match:substring match 1)))
Why not just (set-attribute 'font-weight "bold")?
Similarly below.

Okay, I changed this.
Line 155: (set! alist (reverse alist))
You can use reverse! here

Oddly, this did not work.  I tried

  (reverse! alist)
  (apply entity 'text expr alist)))

but all of the alist entries were removed except for "fill":

  ((fill . "currentColor"))

A quick test with the Guile REPL works:

  guile> (define alist '())
  guile> (set! alist (assoc-set! alist 'a 1))
  guile> (set! alist (assoc-set! alist 'b 2))
  guile> alist
  ((b . 2) (a . 1))
  guile> (reverse! alist)
  ((a . 1) (b . 2))

Am I doing this right?

Improvements for the SVG backend

* Use ly:format instead for rounding page dimensions;
  it gives more accurate results.

* Use the "viewBox" attribute for <svg> to scale the
  output instead of <g scale="">...</g>

* Remove other superfluous grouping tags

* Only match the elements of a PangoFontDescription
  that LilyPond is capable of matching.

* Store the attributes for a PangoFontDescription
  in an alist to filter unwanted attributes.

* Ignore the "style" of a font smob; it cannot be used
  to match the correct embedded SVG font.

* The fill of "round-filled-box" should be "currentColor"

Please review this at

Affected files:
  M scm/framework-svg.scm
  M scm/output-svg.scm

reply via email to

[Prev in Thread] Current Thread [Next in Thread]