[webkit-dev] SVG font file location
Rob Buis
rwlbuis at gmail.com
Wed May 25 13:37:47 PDT 2011
Hi Saba,
On 25 May 2011 16:08, Saba Taseer <stehseen at hotmail.com> wrote:
> I am trying to study SVG fonts rendering in webkit. I followed the
> instructions at http://frabru.de/c.php/article/SVGFonts-usage and got my SVG
> font running for Chrome. I added the same script as a string in winlauncher
> to see the course of events SVG text goes through to render SVG text, but
> the text displays in sans-serif and not in Tomson Talks font. I have
> copied TomsonTalks.svg file in winLauncher folder. I tried giving the
> absolute path to the font file too but it still doesnt work. Please let me
> know where should I put my svg font file for winlauncher application. Here
> is the script I am using
> <?xml version="1.0" encoding="UTF-8"?>
> <svg xmlns="http://www.w3.org/2000/svg"
> xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 400 300">
> <defs >
> <font-face font-family="Tomson Talks">
> <font-face-src>
> <font-face-uri xlink:href="TomsonTalks.svg#TomsonTalks">
> <font-face-format string="svg"/>
> </font-face-uri>
> </font-face-src>
> </font-face>
> </defs>
> <text font-family="'Tomson Talks',sans-serif" font-size="25">hello
> <tspan x="302" y="60" text-anchor="middle">You cause</tspan>
> </text>
> </svg>
>
> I am not good at scripting, plz help me if I have done smthing wrong in the
> script.
If TomsonTalks.svg is in the same dir as the listed svg I think it
should work. You can try removing the spaces in the name as well, I
think it looks valid how you did it but maybe there is a bug there.
Finally, as a sanity check you could try
LayoutTests/svg/custom/glyph-transformation-with-hkern.svg as a SVG
font test that should work. If you don't have source checkout you can
get it here:
http://svn.webkit.org/repository/webkit/trunk/LayoutTests/svg/custom/
Cheers,
Rob.
More information about the webkit-dev
mailing list