in src/syntaxhighlight/SyntaxHighlighterPane.java [511:536]
protected static Font setFont(Font font, boolean bold, boolean italic) {
if (font == null) {
return null;
}
if ((font.getStyle() & Font.BOLD) != 0) {
if (!bold) {
return font.deriveFont(font.getStyle() ^ Font.BOLD);
}
} else {
if (bold) {
return font.deriveFont(font.getStyle() | Font.BOLD);
}
}
if ((font.getStyle() & Font.ITALIC) != 0) {
if (!italic) {
return font.deriveFont(font.getStyle() ^ Font.ITALIC);
}
} else {
if (italic) {
return font.deriveFont(font.getStyle() | Font.ITALIC);
}
}
return font;
}