> Brent L Johnson wrote:
>
> Since I couldn't get my TTF file to convert to an SVG file I decided
> to try transcoding an SVG file exported by Adobe Illustrator. I got
> one of our Mac guys to export an SVG from Illustrator (using the font
> I want to embed) - and what it seems to do is encode the fonts used in
> the SVG file using base64,
Base 64 is the encoding used in the data: URL scheme. What is missing
(and invalid, because otherwise text/plain is assumed) is the MIME type
of the resource. But in fact it is a CEF format font. CEF is an Adobe
subset of OpenType - using truetype tables, but only allowing glyphs in
Type1 format not Truetype format.
> ithen includes this in a <style> tag in the
> SVG file. Here is a little snip:
>
> ----------------------------
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
> "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd">
> <svg width="200" height="80">
> <style type="text/css">
> <![CDATA[
> @font-face{font-family:'TechnoRegular';src:url("data:;base64,\
> T1RUTwACACAAAQAAQ0ZGIPghb0EAAAAsAAAhnGNtYXABmwIZAAAhyAAAAGwBAAQCAAEBAQ5UZWNo\
> bm9SZWd1bGFyAAEBATb4GwH4GAT+lP2eHAlqHAinBR6gAEiCgSX/i4seoABIgoEl/4uLDAf3HA/3\
> ....
> gK8froCueaxwrnCod6J+CH6ioIWeG6ykmKSbH5ukk7C6Gg76kBT6oRUAAAABAAAAAwAAAAwABABg\
> 3//e/93/3P/Z/9P/0AABAAAAAAAAAAAAAAAAAAAAAAAAAAA=")}
> ]]>
> </style>
> <text transform="matrix(1 0 0 1 0 50)">
> <tspan x="0" y="0" style="font-family:'TechnoRegular';
> stroke:none; font-size:30;">This is a test!</tspan>
> </text>
> </svg>
> ----------------------------
>
> This works great using Adobe's SVG viewer in the web browser.
For two reasons One, it supports the @font-face block Two, it supports
the particular font format that is used.
> But,
> when I try and use Batik to transcode this SVG file I get the
> following error:
>
> org.w3c.dom.DOMException: An error occurred in an author stylesheet:
> The following text represents an invalid CSS document:
>
>
> @font-face{font-family:'TechnoRegular';src:url("data:;base64,\
> T1RUTwACACAAAQAAQ0ZGIPghb0EAAAAsAAAhnGNtYXABmwIZAAAhyAAAAGwBAAQCAAEBAQ5UZWNo\
> bm9SZWd1bGFyAAEBATb4GwH4GAT+lP2eHAlqHAinBR6gAEiCgSX/i4seoABIgoEl/4uLDAf3HA/3\
> ....
I wqish Batik error messages would distinguish between "invalid' and 'as
yet unsupported'.
There is no error in the document, apart fromthe lack of a mime type in
the url
> Can anyone provide me with any help on this? Has anyone had luck
> embedding a truetype font? I know SOME have, I saw earlier posts to
> the mailing list talking about "blocky" TT fonts, so apparently some
> people are getting this to work.
That doesn't mean they are embeding the fonts, it might mean that they
are referencing local TrueType fonts 9and the blockiness might be from
the Freetype rasterizer, which by default compiles with
US-software-patent-avoidance set to "yes" ;-)
--
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]