mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
terminal: instantiate font explicitly instead of using java.awt.Font#decode (IDEA-219814)
The problem is that java.awt.Font#decode tries to parse string according to different formats, like "Monospaced bold 12". It doesn't work good to parse "JetBrains Mono" string as "JetBrains Mono" font. Ironically, it parses correctly other strings like "JetBrains Mono Norm". GitOrigin-RevId: 6360c6993553269783e2d59c05c9acca68eb6a21
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d003425bc4
commit
699160e282
+1
-9
@@ -434,15 +434,7 @@ public class JBTerminalSystemSettingsProviderBase extends DefaultTabbedSettingsP
|
||||
|
||||
@Override
|
||||
public Font getTerminalFont() {
|
||||
Font normalFont = Font.decode(getFontName());
|
||||
|
||||
if (normalFont == null) {
|
||||
normalFont = super.getTerminalFont();
|
||||
}
|
||||
|
||||
normalFont = normalFont.deriveFont(getTerminalFontSize());
|
||||
|
||||
return normalFont;
|
||||
return new Font(getFontName(), Font.PLAIN, (int)getTerminalFontSize());
|
||||
}
|
||||
|
||||
public String getFontName() {
|
||||
|
||||
Reference in New Issue
Block a user