[Chart] Fwd: Fwd: [diagrams] Re: [GSoC 2013] Progress - Porting Charts to Diagrams

Jan Bracker jan.bracker at googlemail.com
Mon Jul 29 16:40:31 BST 2013


Hello everybody,

here the latest progress on the project:

- While using SVGFonts I fixed a few minor bugs in it.
- The "ToRenderable" type class is reintroduced, because the type
complications are not there anymore.
- Some clean up and more specific documentation (especially paths).
- Switched from data-default to data-default-class.
- Standard alignment functions are not provided instead of redifined in
each backend.
- Updated the diagrams backend to use the HEAD of diagrams instead of the
hackage version.
- All my work until 25th of July has been merged into the main charts repo!
- Worked on the font support in the diagrams backend. This works well now.
- Included standard fonts in the diagrams backend package. This also
includes additional versions to support bold and italic fonts.

The current head is "stable", except for the text metrics [1]. I figured
out the metrics. Some issues I still have:

- For some reason SVGFonts seems to be rendering fonts of same size
considerably smaller then cairo. Not sure what the reason is. Going to
double check on this.
- One of the tests is still missing some lines.
- Quality of font rendering is notably worse with SVGFonts. I do not think
this can really be improved except by adding native text rendering to
diagrams (+ font metrics). Though, when using sans-serif and monospace
fonts quality is acceptable (Adobe seems to be doing good work with Source
Sans Pro and Source Code Pro). Maybe I will check for an alternative serif
font, though it will be hard to beat the character support of Linux
Libertine.

Greetings
Jan

[1]:
https://github.com/jbracker/haskell-chart/tree/e01257cda11d9832ac9a3c7af424c02bd83cb1a2


2013/7/23 Stephen Tetley <stephen.tetley at gmail.com>

> Hi Jan
>
> In the PostScript world, glyph metrics are given as 1/1000 of a point
> size. One would hope SVG might follow this lead.
>
> Although out-of-date in the TrueType world, the AFM spec from Adobe is a
> readable (and skimmable) introduction to glyph metrics and still a
> worthwhile reference.
>
> http://partners.adobe.com/public/developer/en/font/5004.AFM_Spec.pdf
>
> Best wishes
>
> Stephen
>
> On 23 July 2013 11:07, Jan Bracker <jan.bracker at googlemail.com> wrote:
>
>>
>>
>> Aside of that I also noticed that the text metric information in SVGFonts
>> are not given in device coordinates. Am I right in assuming they are given
>> in 1000em, because the value "units-per-em" says 1000? If that is right I
>> will try to dig my way through the textSVG' function to find out how to
>> convert that into device coordinates.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/chart/attachments/20130729/39c11a0d/attachment.htm>


More information about the Chart mailing list