From owner-freebsd-questions@FreeBSD.ORG Sat Jan 24 08:17:08 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E01655 for ; Sat, 24 Jan 2015 08:17:08 +0000 (UTC) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A927479 for ; Sat, 24 Jan 2015 08:17:06 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id k48so1258644wev.9 for ; Sat, 24 Jan 2015 00:16:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=ORVyFlu7egjDp1tFDhuD/71JLFroXrn1cZS9YQ6TpTM=; b=TQaDE14RD36L9fK51dlf/EZK4qJqTLrKh4a2yDyGsg+H4qPDe9xwXhNzoc/0p5eQJI +3l8Quhc2sG7G5jFn9YUIS9zYxWN2KHQEgGXXrr6pnlwm1rL2thY531rU9hI5YaA/DJK lqLttHQc+yJeYUojelo3fNVu80pTrg/HhjS9+/t/1N3sLM8WpGtdDUmexQq5oQtCvg0p zePgIMhzeujXu09JIZ2PEBEa7Wm0WJ9O91KaZ2s4aI5XKPBN7JS5jHkQXd/VWy441v8B UzXqFisxMF1FMchc0o2nYIPexphKXuKmOxmvHV9wkNVuaR7Jyl5AsXn7vglUAKAD9lgf 987w== X-Gm-Message-State: ALoCoQmmFq2fEU7VHqr8HW3ma/sOqfYRdIOTpuHa+roto6QS4/zPR8GkObgu8D7ex7/0lOMiRhZD MIME-Version: 1.0 X-Received: by 10.180.206.14 with SMTP id lk14mr2571770wic.71.1422087419595; Sat, 24 Jan 2015 00:16:59 -0800 (PST) Received: by 10.194.203.102 with HTTP; Sat, 24 Jan 2015 00:16:59 -0800 (PST) Date: Sat, 24 Jan 2015 16:16:59 +0800 Message-ID: Subject: How to use two kinds of fonts in x11-wm/dwm bar? From: alphachi To: "list: freebsd" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 08:17:08 -0000 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: monospace Terminus Noto Sans CJK SC 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!