From 147b3db27350f5bfeb40bc5f5b9a8a5403781a3f Mon Sep 17 00:00:00 2001 From: ribet Date: Fri, 28 Sep 2007 13:14:34 +0000 Subject: Ajout de la gestion des fontes XLFD --- src/SVG/SVG2zinc/Conversions.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/SVG/SVG2zinc') diff --git a/src/SVG/SVG2zinc/Conversions.pm b/src/SVG/SVG2zinc/Conversions.pm index 516c8d3..24564ea 100644 --- a/src/SVG/SVG2zinc/Conversions.pm +++ b/src/SVG/SVG2zinc/Conversions.pm @@ -142,14 +142,16 @@ sub createNamedFont { } my $fontKey = join "_", ($family, $size, $weight); + my $fontName = $fontKey; + $fontKey =~ s/^-/XLFD-/; if (!defined $fonts{$fontKey}) { $fonts{$fontKey} = $fontKey; - return ($fontKey, "->fontCreate('$fontKey', -family => \"$family\", -size => $size, -weight => \"$weight\") if ! \$fonts {\"$fontKey\"};"); + return ($fontKey, $fontName, "->fontCreate('$fontKey', -family => \"$family\", -size => $size, -weight => \"$weight\") if ! \$fonts {\"$fontKey\"};"); } else { - return ($fontKey,""); + return ($fontKey, $fontName, ""); } } # end of createNamedFont -- cgit v1.1