diff options
author | ribet | 2007-10-30 16:19:21 +0000 |
---|---|---|
committer | ribet | 2007-10-30 16:19:21 +0000 |
commit | ae457a9bf74a32cc54a7fcfba93d6a11a16ce782 (patch) | |
tree | ccbfbc8482710026397237235cb665105543447a | |
parent | 56ace5bcfdcf422b6b2e179c0c173be3efd1c0a3 (diff) | |
download | mtc-ae457a9bf74a32cc54a7fcfba93d6a11a16ce782.zip mtc-ae457a9bf74a32cc54a7fcfba93d6a11a16ce782.tar.gz mtc-ae457a9bf74a32cc54a7fcfba93d6a11a16ce782.tar.bz2 mtc-ae457a9bf74a32cc54a7fcfba93d6a11a16ce782.tar.xz |
Fix for non-XLFD fonts.
-rw-r--r-- | doc/basique.svg | 25 | ||||
-rw-r--r-- | src/SVG/SVG2zinc.pm | 6 |
2 files changed, 28 insertions, 3 deletions
diff --git a/doc/basique.svg b/doc/basique.svg index cd0606f..3e7efa3 100644 --- a/doc/basique.svg +++ b/doc/basique.svg @@ -50,12 +50,12 @@ inkscape:pageshadow="2" inkscape:zoom="0.35" inkscape:cx="375" - inkscape:cy="520" + inkscape:cy="517.14286" inkscape:document-units="px" inkscape:current-layer="layer1" inkscape:window-width="1202" inkscape:window-height="998" - inkscape:window-x="1881" + inkscape:window-x="390" inkscape:window-y="78" /> <metadata id="metadata7"> @@ -109,5 +109,26 @@ x="382.85715" y="55.219326" ry="13.736895" /> + <text + xml:space="preserve" + style="font-size:10;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Century Schoolbook L;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;line-height:125%" + x="285.71429" + y="126.6479" + id="text1877" + sodipodi:linespacing="125%"><tspan + sodipodi:role="line" + id="tspan1879" + x="285.71429" + y="126.6479">TEST</tspan></text> + <text + xml:space="preserve" + style="font-size:12px;font-style:normal;font-weight:normal;fill:black;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:-aster-script-medium-r-normal--8-120-96-96-p-100-iso8859-1" + x="202.85715" + y="166.6479" + id="text1879"><tspan + sodipodi:role="line" + id="tspan1881" + x="202.85715" + y="166.6479">Hello !</tspan></text> </g> </svg> diff --git a/src/SVG/SVG2zinc.pm b/src/SVG/SVG2zinc.pm index d1e3235..5b25aa1 100644 --- a/src/SVG/SVG2zinc.pm +++ b/src/SVG/SVG2zinc.pm @@ -1844,7 +1844,11 @@ sub analyze_text_style_hash my ($fontKey,$fontName,$code) = &createNamedFont ($fontFamily, $fontSize, $fontWeight); &display("\$fonts{\"$fontKey\"} = ") if $code; &display($code) if $code; - $res .= ", -font => \"$fontName\""; + if ($fontKey =~ /^XLFD-/ ) { + $res .= ", -font => \"$fontName\""; + } else { + $res .= ", -font => \"$fontKey\""; + } $current_font_key = $fontKey; } return $res; |