Date: Sat, 24 Jan 2015 16:16:59 +0800 From: alphachi <alphachi@mediaspirit.org> To: "list: freebsd" <freebsd-questions@freebsd.org> Subject: How to use two kinds of fonts in x11-wm/dwm bar? Message-ID: <CAJN5%2BGvXFhRMM--U3KnehcdRWKTGXvo%2BYiKY-9YKX8-DJhwwoQ@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi! I installed x11-wm/dwm with XFT. I modified config.def.h to support CJK chars in bar: static const char font[] = "Noto Sans CJK SC Regular:style=Regular:size=11"; My locale setting is zh_CN.UTF-8 and everthing is fine. Now I want to combine the two fonts - use x11-fonts/terminus-font to display all chars it supports, and use x11-fonts/noto to display all chars that x11-fonts/terminus-font doesn't support. I did these things: 1. Add something in fonts.conf: <match target="pattern"> <test name="family"> <string>monospace</string> </test> <edit name="family" mode="prepend" binding="strong"> <string>Terminus</string> <string>Noto Sans CJK SC</string> </edit> </match> 2. Modify config.def.h: static const char font[] = "monospace:size=11"; 3. Check font match: > fc-match -s monospace ter-112n.pcf.gz: "Terminus" "Regular" ter-x12n.pcf.gz: "Terminus" "Regular" NotoSansCJKsc-Regular.otf: "Noto Sans CJK SC" "Regular" ... After this, I set the default font to monospace in Firefox and test - it's ok. When I reinstall dwm, the default font of dwm changes to Terminus, but all chars that should use Noto, like CJK chars, can't display correctly - they display as many solid blocks. I dont' know what's wrong, thanks!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJN5%2BGvXFhRMM--U3KnehcdRWKTGXvo%2BYiKY-9YKX8-DJhwwoQ>