Potential mentors for SVG Fonts, this is the final revision of my SoC  application (as submitted today).

Abstract


SVG Fonts is a feature described on section 20 of the SVG 1.1 specification that allows fonts to be described using SVG. It can be used to embbed a font into an SVG document so that the author can be sure that the document will be properly rendered in any SVG compliant viewer, not depending on specific fonts being installed on the user's system.

SVG Fonts can also enhance acessibility of documents because text is stored as strings in the xml file. This way, artwork containing text can be read by screen reader software. Also, adaptation of artwork to other languages is easier when text is stored in strings.

I will implement basic SVG Fonts rendering into Inkscape using Cairo's user-font support and Pango.

Detailed Description

1. About Me
2. My first contact with Inkscape
3. How I got interested on coding for inkscape
4. Work done on Inkscape
5. What I intend to do on GSoC'08
5.1 Parameter loading
5.2 Laying out text and rendering
6. future ideas (not to be implemented for SoC'08)
7. Off-topic notes
 
1. About Me

My name is Felipe C.orrêa da Silva Sanches, known on Inkscape community as JucaBlues. I study Electrical Engeneering with emphasys on Telecomunications on University of São Paulo, Brazil. My contributions to Inkscape are described later on this SoC application.


I like a lot to deal with computer graphics and I have been ploting pixels since 11 years old, when I started to learn computer programming by myself on an old 386 with QBASIC and MS-DOS. Later I learned C, C++ and x86 Asm. Recently I have also played a bit with javascript and python.

Currently I am working 20 hours a week on web development (using the django framework) on a brazilian startup. I will continue employed there during SoC.

I have some small free software projects started by myself. Often very small and unimportant stuff. During some time I have contributed with bug reporting and feature requests to some big projects such as Mediawiki and Firefox, and I have aprox. 3 tiny lines of code incorporated in DemocracyTV (now called Miro), but I did not get commit rights on those projects, so I won't count them. The first big project I am involved with a lot of coding is Inkscape.

2. My first contact with Inkscape
I first heard about Inkscape when I was looking for a free software drawing tool. I needed to draw the schematics of wood cuts for my pinball machine(*). By that time Inkscape was on version 0.43 and I remember I got very impressed by the about screen drawing.

3. How I got interested on coding for inkscape
After some time I started designing some SVG images for my hexamines game(**). I had to set the CC-licensing metadata for a lot of files and I didn't know it was possible to do it easily using templates, so I decided to write a patch to make a "default metadata settings" UI. This patch, and a fix to a bug in itself, gave me svn commit rights. Later, the patch was considered confusing and not that much useful and was reverted. But since I saw myself, for the first time, with commit access to a free software project, I got excited about that and decided to pick something to work on. I saw some work going on filters UI (Nicholas Bishopp's SoC) and decided that filter renderers would be something cool to implement.

4. Work done on Inkscape

Last year I have implemented in Inkscape some of the SVG filter renderers. More precisely, these ones: feTurbulence, feDisplacementMap, feFlood, feColorMatrix, feConvolveMatrix, feImage, feMorphology and feComponentTransfer. I have also worked a bit on the filters user interface. I have implemented the filters infobox (which gives users instructions on what each filter primitive does). I have designed all of the icons used on this infobox(***). I have also added all of the tooltips for the filters UI.

I have recently adapted the 0.46 About Screen to some languages, based on advice given by people at inkscape-translator list.

5. What I intend to do on GSoC'08


Basic SVG Font rendering support. This does not include UI for the SVG Fonts.

5.1 Parameter loading

Some time ago I started work on sp-font.{cpp,h}, sp-glyph.{cpp,h}, sp-missing-glyph.{cpp,h} and sp-glyph-kerning.{cpp,h}. These are not functional yet. I intend to complete their implementation, so that svg parameters related to SVG Fonts are correctly parsed. This will probably also need refactoring (as I understand that having these implemented as C++ classes is a main target for 0.47) I will need advice on the refactoring part of this task. (or, alternativelly, I will look at already refactored code in order to find out)

5.2 Laying out text and rendering
I intend to write code that uses Pango to layout text that uses SVG Fonts and then use the new user-font support on Cairo to render it. Although I have never used Pango and Cairo before, so this is the part of my SoC work where I mostly need advice.

I have been chatting about this on irc and on the inkscape-devel list.  Cworth told me that Cairo 1.6 will have this new user-font feature which will be useful for the task. I was wondering when the release will be so that we have time to incorporate it during SoC. Since Cairo 1.6 is scheduled for Ubuntu Hardy, I think we shouldn't worry. Also, since Behdad, the developer of user-font, is also maintainer of Pango, we can hopefully have the proper Pango support soon, also.

Probably, a first step would be to render SVG Fonts which describe their glyphs using only the d "path" attribute. Once this works, I can work on loading general glyphs which use arbitrary SVG.

6. future ideas (not to be implemented for SoC'08)

Here I include some ideas that I would possibly work on after I finish the SoC tasks.

- SVG Fonts to TrueType (or other font formats) conversion and vice-versa
- SVG Fonts User Interface

7. Off-topic notes
(*) You can see my (not yet finished) homebrew pinball machine at www.flickr.com/photos/felipesanches
(**) http://code.google.com/p/hexamines/
(***) The bird photograph was shot by my daddy. If you are interested, you can take a look at his work at www.flickr.com/photos/dariosanches