How to determine dominant baseline
If dominant-baseline can't be extracted from the font properties use a built in table to look up what script the glyph belongs and from that determine which baseline is appropriate for the script.
Further reading material:
The baseline table should look something like this:
The ideographic baseline should be at the bottom of the EM square (ie at 0) but it doesn't look very good. Setting it to half of the descent matches adobe's output, but 3/4 produces a better looking baseline across font size changes.
The alphabetic baseline should be at the bottom of the EM square (ie at 0)
The mathematical baseline is half of the font height
The hanging baseline used by adobe is just the top of the EM square, but a hanging baseline is lower than that. It is generally supplied by the font. A value of 0.8 times the font height produces a reasonable baseline across font size changes.
For value of Auto the SVG spec says: If this property occurs on a 'text' element, then the computed value depends on the value of the 'writing-mode' property. If the 'writing-mode' is horizontal, then the value of the dominant-baseline component is 'alphabetic', else if the 'writing-mode' is vertical, then the value of the dominant-baseline component is 'central'.