WseFontTable ft, WseColorTable ct) {
this.sc = sc;
this.ct = ct;
TextStyle ts = (TextStyle)t.getResolved();
if (ts.isSet(TextStyle.BOLD) && ts.getAttribute(TextStyle.BOLD))
modifiers |= BOLD;
if (ts.isSet(TextStyle.ITALIC) && ts.getAttribute(TextStyle.ITALIC))
modifiers |= ITALIC;
if (ts.isSet(TextStyle.UNDERLINE) && ts.getAttribute(TextStyle.UNDERLINE))
modifiers |= UNDERLINE;
if (ts.isSet(TextStyle.STRIKETHRU) && ts.getAttribute(TextStyle.STRIKETHRU))
modifiers |= STRIKETHRU;
if (ts.isSet(TextStyle.SUPERSCRIPT) && ts.getAttribute(TextStyle.SUPERSCRIPT))
modifiers |= SUPERSCRIPT;
if (ts.isSet(TextStyle.SUBSCRIPT) && ts.getAttribute(TextStyle.SUBSCRIPT))
modifiers |= SUBSCRIPT;
fontSize = (byte)(ts.getFontSize() * 2);
fontName = ts.getFontName();
fontIndex = (byte)ft.getFontIndex(fontName);
if (fontIndex == -1) {
ft.add(fontName);
fontIndex = (byte)ft.getFontIndex(fontName);
}