服务器是CentOS。
[root@CentOS-73-64-minimal ~]# fc-list : family
- 清洁
- Lohit Kannada
- PT Sans
- 卡利托
- 高棉OS系统
- Lohit Nepali
- 米拉
- PT Sans Narrow
- DejaVu Sans Mono
- Nuosu SIL
- 高棉操作内容
- Open Sans,Open Sans Semibold
- Lohit Oriya
- PakType Naskh Basic
- FreeSerif
- Lohit Assamese
- 红木
- DejaVu Sans,DejaVu Sans Light
- WenQuanYi Micro Hei Mono,文泉驿等宽微米黑,文泉驿等宽微米黑
- DejaVu Sans
- VL Gothic,VLゴシック
- DejaVu Serif,DejaVu Serif Condensed
- Lohit Punjabi
- NanumGothic,나눔고딕
- DejaVu Sans,DejaVu Sans Condensed
- 高棉操作
- Open Sans
- 解放单声道
- WenQuanYi Zen Hei Mono,文泉驿等宽正黑,文泉驿等宽正黑
- 马丹
- Caladea
- AR PL UMING TW MBE
- NanumGothic,나눔고Nan,NanumGothicExtraBold,나눔고딕ExtraBold
- WenQuanYi Micro Hei,文泉驿微米黑,文泉驿微米黑
- AR PL UMing HK
- Lohit Telugu
- AR PL UMing CN
- AR PL UMing TW
- Lohit Marathi
- Lohit Gujarati
- Liberation Serif
- Lohit Malayalam
- STIX
- LKLUG
- WenQuanYi Zen Hei Sharp,文泉驿点阵正黑,文泉驿点阵正黑
- 解放Sans
- 卓木拉日峰
- WenQuanYi Zen Hei,文泉驿正黑,文泉驿正黑
- FreeSans
- 固定
- Lohit Devanagari
- Lohit Tamil
- Lohit Bengali
- Abyssinica SIL
- Waree度假村
- Open Sans,Open Sans Light
- 立交桥
- DejaVu Serif
- Open Sans,Open Sans Extrabold
- FreeMono
- 阿米
当我用中文字符绘制字符串时,java绘制框
以下是代码:
Font font = new Font("Open Sans", Font.PLAIN, 12);
context2d.setFont(font);
color(color);
context2d.drawString(text, x, y);
结果应为:
感谢。