SVGKit/SVGKit — pull request #204 by dgileadi (2014-08-26 22:00:52+00:00)
Title: Improvements to SVGTextElement to support text-anchor and fill, plus a better vertical offset.

text-anchor and fill are simple to support for SVGTextElement, so this patch adds support. The biggest change is in SVGHelperUtilities to split out parsing the fill into a standalone method.

This patch also switches SVGTextElement to use CTLineGetTypographicBounds to get the font's ascent, and uses it as the vertical offset instead of the text bounds' full height. On my system this improves the text positioning to match Safari.