[webkit-help] Loading SVG fonts from the disk.

Saba Taseer stehseen at hotmail.com
Tue Sep 13 00:14:40 PDT 2011


I am playing with svg fonts. I tried to display text in the svg font, that is locally stored in the svg files. I use this file to load fonts and display text.
 
<?xml version='1.0' encoding='UTF-16' standalone='no'?>
<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 20010904//EN' 
'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'>
<svg id='svgcontent' xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink' xml:space='preserve'
width='300' height='24' >
<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>
 
           <font-face font-family='Ubuntu Talks'>
                    <font-face-src>
                          <font-face-uri xlink:href='UbuntuTitleBold.svg#UbuntuTitleBold'>
                                  <font-face-format string='svg'/>
                         </font-face-uri>
                  </font-face-src>
          </font-face>
 
         <font-face font-family='Graffiti'>
                     <font-face-src>
                            <font-face-uri xlink:href='graffiti.svg'>
                                  <font-face-format string='svg'/>
                           </font-face-uri>
                   </font-face-src>
         </font-face>
</defs>

 
<text x ='0' y ='20' id ='textvalues' font-family = 'Ubuntu Talks' font-size ='20'>
                  <tspan x='0' y ='20' id='1' font-familty='Ubuntu Talks' font-size ='20'>abc</tspan>
</text>
</svg>
 
When I run this file with frame->loadRequest function, it does not display anything.
 
I then converted all this into an html string and used frame->loadHTMLString but it is not showing the right font. If I give it the link to an online svg font it works correctly. The file is running fine with winLauncher. Did I miss something in integration ??
 
Please hlep me urgently


 
Regards,
Saba Taseer 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20110913/e0e3ed06/attachment.html>


More information about the webkit-help mailing list