Browse files

[Sambal] center the text paragraphs

  • Loading branch information...
1 parent 75f6ca7 commit 19bc16bf916e075e1b4c8e18899a1ef8988d6aa7 @masak committed Apr 21, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Sambal.pm
View
3 lib/Sambal.pm
@@ -59,7 +59,8 @@ module Serializer {
multi svg(Text::Markdown::Para $para) {
my $y = 300 - 50 * ($*num_paras - 1) + 100 * $*para_index++;
- qq[<text xml:space="preserve" x="400" y="$y" style="font-size:40px">],
+ my $style = 'font-size:40px;text-anchor:middle';
+ qq[<text xml:space="preserve" x="400" y="$y" style="$style">],
(map { svg($_) }, $para.children),
qq[</text>\n];
}

0 comments on commit 19bc16b

Please sign in to comment.