Fixes #80 by falling back on dominant-baseline if alignment-baseline is unspecified.
Note that according to MDN, if dominant-baseline is defined within a parent and a child sets its alignment-baseline to baseline, it should be equivalent to the same value as the parent's dominant-baseline.
This specific case is not supported here. All this PR does is allow the usage of dominant-baseline on text nodes. Child nodes are not considered.
This PR also applies the current context before rendering a text node, since this was previously not done, causing adjacent text nodes that uses different font styles to use the same one.
Fixes #80 by falling back on
dominant-baseline
ifalignment-baseline
is unspecified.Note that according to MDN, if
dominant-baseline
is defined within a parent and a child sets itsalignment-baseline
tobaseline
, it should be equivalent to the same value as the parent'sdominant-baseline
.This specific case is not supported here. All this PR does is allow the usage of
dominant-baseline
ontext
nodes. Child nodes are not considered.This PR also applies the current context before rendering a
text
node, since this was previously not done, causing adjacenttext
nodes that uses different font styles to use the same one.