I read about bitwise operations a lot, but still, I couldn't give a meaning to this line.
((text.flags & ~Text.BOLD) & ~Text.ITALIC) | Text.BOLD | Text.ITALIC
It seems like the author is trying to be sure that this text doesn't have styles BOLD and ITALIC, and then he makes the text ITALIC and BOLD.
Am I right, or missing some detail?