xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas E Deweese <thomas.dewe...@kodak.com>
Subject Font Rastering Issue
Date Fri, 03 Aug 2001 11:47:51 GMT
>>>>> "SN" == Scott Neufeld <SNeufeld@netreturnllc.com> writes:

SN> We're using Batik to convert SVG to JPEG, and have noticed
SN> inconsistencies between how SVG Viewer displays the SVG, and how
SN> the Batik-generated JPEG looks, specifically with regards to the
SN> fonts. I have included a PDF file that contains images showing the
SN> problem:

    Ok, I was hoping someone more 'in tune' with fonts in SVG would
chime in, but here I go.

    SVG implementations are given a bit of "wiggle room" when dealing
with platform fonts.  So I'm not particularly surprised that you get
different results between Adobe's SVG Viewer and the Batik toolkit
(BTW Batik also provides an SVG Viewer, so you should make it clearer
what exact viewer you are talking about - also version numbers might
be nice as well).


SN>                  First off, it appears as though SVG Viewer
SN> accepts font members, while Batik accepts only font families. For
SN> example, "Helvetica Condensed Bold" works as expected in the SVG
SN> Viewer, but Batik does not. All of this is occuring on the same
SN> machine (the viewing and the conversion to JPEG from SVG), so it
SN> isn't a "font doesn't exist" issue.

    Once again there are others that can provide a detailed answer to
this, but it is possible that the Adobe Viewer is 'manufacturing' a
'Condensed' version from the normal 'Helvetica Bold' (I know Adobe has
done lots of work in this area for other tools).

SN>                  Next, the weighting of a font has no effect, in
SN> SVG Viewer, on the dimensions of the text. However, when converted
SN> to a JPEG, the text dimensions are considerably different.

    Since I believe for Batik adjusting the weight simple selects
between light, normal, bold versions of the font at various weight
factors, I'm not surprised that when you go from normal to bold (for
example) you get significantly different metrics (if fact I'm
surprised they stay the same in the Adobe viewer since as the chars
get heavier and heavier eventually they should start running into each

SN>                  Any help would be greatly appreciated, and any
SN> general info on Fonts in SVG (specifically how I can expect things
SN> to raster using Batik) would also be greatly appreciated.

    My general suggestion, if precise font rendition is important,
across a wide variety of viewers, and platforms is to use SVG Fonts.
This allows you to embed the font in the SVG document, Viewers are
given significantly less wiggle room when working with SVG Fonts than
when working with platform fonts.

    Please note that the Batik toolkit includes a tool to convert True
Type fonts to SVG Fonts.  I think (hope) this will give you the
consistent results you are looking for.

To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-users-help@xml.apache.org

View raw message