diff options
Diffstat (limited to 'src/SVG/SVG2zinc/Conversions.pm')
-rw-r--r-- | src/SVG/SVG2zinc/Conversions.pm | 6 |
1 files changed, 4 insertions, 2 deletions
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 |