/**
* Creates a text style instance based on the supplied element's stylings.
*/
public static TextStyle createTextStyle (Element<?> elem) {
return new TextStyle(
Styles.resolveStyle(elem, Style.FONT),
Styles.resolveStyle(elem, Style.TEXT_EFFECT) != TextEffect.PIXEL_OUTLINE,
Styles.resolveStyle(elem, Style.COLOR),
Styles.resolveStyle(elem, Style.TEXT_EFFECT).createEffectRenderer(elem),
Styles.resolveStyle(elem, Style.UNDERLINE));