1. Go to the JDK installation directory under the/jre/lib folder, locate the FONTCONFIG.PROPERTIES.SRC, copy it as fontconfig.properties, and modify the file.
Found it:
Sequence.monospaced.gbk=chinese-ms936,alphabetic,dingbats,symbol,chinese-ms936-extbmonospaced.plain.alphabetic =courier Newmonospaced.bold.alphabetic=courier New Boldmonospaced.bolditalic.alphabetic=courier New Italicmonospaced.bolditalic.alphabetic=courier New Bold Italic
Modified to:
Sequence.monospaced.gbk=alphabetic,chinese-ms936,dingbats,symbol,chinese-ms936-extbmonospaced.plain.alphabetic =consolasmonospaced.bold.alphabetic=consolas Boldmonospaced.bolditalic.alphabetic=consolas Italicmonospaced.bolditalic.alphabetic=consolas Bold Italic
Add the Consola font definition at the end of the file:
FileName. Consolas=consola. Ttffilename.consolas_bold=consolab. Ttffilename.consolas_italic=consolai. Ttffilename.consolas_bold_italic=consolaz. TTF
2.
Configuring in NetBeans
Netbeans->工具->选项->字体和颜色
The font is set to monospaced.
Setup succeeded. The settings for the other fonts will be set to a different font consola.
NetBeans uses Consolas to solve Chinese garbled characters