timbod7/haskell-chart — pull request #10 by jbracker (2013-09-16 12:18:17+00:00)
Title: Layout refactor & Font embedding in SVGs

#### Layout refactor

This work splits the `Layout1` type into `Layout` and `LayoutLR`. `Layout` now represents a chart with one x axis and one y axis (of course this axis can be shared on both sides). `LayoutLR` in addition has the ability to display two different y axis on each side of the chart. `Layout1` was devided/removed, because it was a mixture of both types and allowed operations that were not wanted. In addition `LayoutLR` can even display two different y axis that represent different types of data, which was not possible before.

Several other changes were made along the way:

* `AxisVisibility` type was introduced to determine which parts of an axis shall be displayed at all. It contains three flags to turn the axis line, labels and ticks on or off.
* `_laxis_visible` was removed from `LayoutAxis` since its function is now replaced by the new `AxisVisibility` type.
* The compression of x labels was removed from `StackedLayouts`. Each Layout now controls which axis are displayed itself. Also `StackedLayout` supports both types of layout.
* All tests were modified to work with the new interface and produce the same charts as before.

All commits for this part were made in September.

#### Font embedding in SVGs

This adds funtions to add the capability for embedding fonts in output SVG files.

* Switched to using the `State` monad to pass around the internal rendering state.
* The built in fonts can now also be referenced by their real font family names.applyapply
* The diagrams backend now support to switch between native font rendering and SVG font rendering.
* When using native font rendering used glyphs are collected for each used font.
* Added four new helper functions that embed fonts in output SVG data or files.
* Added test runners for the embedded font versions. All tests pass fine.
* Increased the version requirements for diagrams-svg and SVGFonts since they offer new features needed for the embedding to work. See diagrams/diagrams-svg#38 and diagrams/SVGFonts#9 for more information.

The commits for this work are on Aug 26 to Aug 29.