Fonts and Mobile SVG


Posted by Antoine Quint apropos on Tue Nov 16th, 2004 at 14:11:33 BST

Bruno Rodrigues from Vodafone has a pretty interesting blog site. Lately, Bruno has been writing about his early experience as an SVG content author. His last entry has a few bits about what you can or cannot do when authoring mobile SVG content.

One very interesting point that he brings forward is that there's no system fonts, which means you have to include your own fonts. Clarifying this, in the unfortunate case where the SVG implementation does not have access to the phone's device font, as in the Sony Ericsson K700, then the only way to ensure your text will be displayed is to provide an SVG font with your document. If you have to cater for this type of case, then there are a few unpleasant bits lining up for you.

The first thing you have to do is have an SVG font to begin with. Luckily, Bitstream have donated their Vera font (a Verdana look-alike) to the Gnome project for non-commerical usage. A while back Dean Jackson, W3C SVG Staff Contact, converted this font to SVG using the Batik SVG Font Converter. Anyone can go ahead and convert their fonts to SVG with this tool, provided that person respects the font's licensing.

Once you have your SVG font ready, then you run into the inconvenience that you have to embed the SVG font in SVG Tiny 1.1. So if, as Bruno points out, you have to embed a 65k font for each file, then you're in trouble. Let me point out now that in SVG Tiny 1.2 this constraint is no more and you can point to an external SVG font that can be reused and cached for multiple documents.

But for today, Bruno needs to write SVG Tiny 1.1 content. So he came up with a really nice little Font Splicer tool that lets you input a string of text and get a custom-made Sera (renamed to comply with licensing) SVG font that only features the few characters that you really need, thus limiting the size of the final SVG Tiny file. Well done Bruno, this is truly useful for SVG Tiny 1.1 content.

Another way to do it, which I don't advise you do unless it is a last resort, is to convert all your text to SVG shapes. Doing this will likely save you space and absolutely preserve the intended appearance of your text; however, it won't truly be text anymore, although you could have <title> and <desc> elements to partially make up for it. One of the important to keep text as <text> is that your content is still accessible, indexable and searchable.

Display: Sort:
Display: Sort:
Login

Make a new account

Username:
Password: