In my plugin it is sometimes necessary to fix highlighting performed during the first level of highlighting(based on Lexer output).
Some tokens recognized as keywords highlight with SyntaxHighlighterColors.KEYWORD(dark-blue and bold).
Then, I try to rehighlight some of them and reapply highlight during Annotation level.
I use TextAttribute like:
static final TextAttributes TEXT_ATTR = new TextAttributes(new Color(0,0,0), null, null, null, Font.PLAIN);
But it leads to only changing color! Weight is still to be BOLD.
Need to note, that new TextAttributes(new Color(0,0,0), null, null, null, Font.ITALIC) works.