From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Proportional fonts in the mode line (one month test) Date: Wed, 24 Nov 2021 08:49:15 -0800 Message-ID: <9B381C7A-A84D-4585-8D37-6CC8AE6511D1@gmail.com> References: <87h7c1u0cg.fsf@gnus.org> Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28775"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 24 17:50:33 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpvTd-0007IU-HM for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 17:50:33 +0100 Original-Received: from localhost ([::1]:59352 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpvTb-0005Er-GF for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 11:50:31 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpvSS-00049u-MX for emacs-devel@gnu.org; Wed, 24 Nov 2021 11:49:20 -0500 Original-Received: from [2607:f8b0:4864:20::32c] (port=34484 helo=mail-ot1-x32c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpvSR-0004PS-4v for emacs-devel@gnu.org; Wed, 24 Nov 2021 11:49:20 -0500 Original-Received: by mail-ot1-x32c.google.com with SMTP id x19-20020a9d7053000000b0055c8b39420bso5235521otj.1 for ; Wed, 24 Nov 2021 08:49:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9IWPd66mEw2YVs3EwB9aItrX90GBttGCLak3zQwrNzA=; b=DG/O6THXKzAUgqmqhB35aHKRhK7kJdsSUrE1H4tdoGbBA1K6AqGZAT/iB3rm4hgmEH laBPo1ASGgHJPO23d6YRz2NiDkTJjRthN87SSOTY5pG3E1b5HdeNIooxRypKbyGwMS/1 jXTxX58IxjeT0yg4cBlr+KNGcc0lnqrZgIDNMnK9sOg/EBteAToUb5hh22p57E1W/VHW 3lMCljAn9QMHHAh5za3L0dUEU6sEnUg5QXCcaUMkmtS/ZrwKDGLFMw65WMeZO8RQDI4e uaHbrBQuF3vOfsqL7FloV5tJF2vF1iIu9ZaSo+SYs6Rk6nuFb1Q2BsfHVUhl4zi8WnFO nDcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9IWPd66mEw2YVs3EwB9aItrX90GBttGCLak3zQwrNzA=; b=8GlsB/3CTMQtEPKeQmDKh0glU3El7PanIfSwjBWkHbUqmyOeiYZxe492oiFdRk95mQ qwBoXlDo3bcslWUSayhmxnfEcJ/RQENTcQhVhOABRMUPKgDCN0L4SLCYRXYtY+4gXMEv ZQtWIXbS68eV8luOiWG/NUAjL2cNerS1Spmtq+ixlhD41pFWhqSB6qzZTAoNqP4MlFm+ y0XHWkyW+/pjG5AIgz75VVpMkrUuJHI9Zi4fn9UpvBjAdE+rbm25EWpf25IqL+FV93vO ERuMV1y3trn0FjCOxTNZXgU5wKJJMpepFtqa0lzqFCKdzHW/Lrk7B4goZMQ1osOx7Txh U9/Q== X-Gm-Message-State: AOAM533Sv+tprVBvTEnY6WrKh+2ldSjwQSAOgSusz39nh5OigxWZtEj1 Gn2dAJkO9yQzcPVKUqPqhMBMq+HN7cY= X-Google-Smtp-Source: ABdhPJxzQdejhxx0YkcS+mAnSEiIv9eiJSATKQ6+f+h0ow10nZvHv901hYtraIz6H97ffpOgMFFIIA== X-Received: by 2002:a9d:1b0:: with SMTP id e45mr14008701ote.23.1637772557265; Wed, 24 Nov 2021 08:49:17 -0800 (PST) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:1567:ff0f:8ef5:fc6d]) by smtp.gmail.com with ESMTPSA id n23sm73839oig.4.2021.11.24.08.49.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Nov 2021 08:49:17 -0800 (PST) In-Reply-To: <87h7c1u0cg.fsf@gnus.org> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::32c (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::32c; envelope-from=casouri@gmail.com; helo=mail-ot1-x32c.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280012 Archived-At: > On Nov 24, 2021, at 5:53 AM, Lars Ingebrigtsen wrote: >=20 > I've now switched master over to defaulting to proportional fonts in = the > mode line. Customise the `mode-line' face to get the old look back. >=20 > I've made the most obvious things that change size -- the U:-- thing, > the top/bot, and the line/col thing -- use the `min-width' spec, so > things should jump around (for those that care about that). >=20 > There's probably more things that should be handled that way, but = we'll > take that as we go along. >=20 > This is just a test: If everybody hates this default, we won't = proceed, > but we won't know unless we test it. So we're now testing this on the > trunk for a month. Vote in a month. I like the idea and have been using a proportional font because it looks = prettier. The only complication is that with proportional font, there is = no nontrivial way to right-align some text: In fixed-width environment, = you just pad enough spaces, but in proportional environment, you have to = pad (space :align-to (- (+ right right-margin) (PIXEL_WIDTH))) where = PIXEL_WIDTH =3D pixel width of the stuff on right. And there is no easy = way to calculate the pixel width of a piece of text. I have used some = hack that extracted the font object from the face and use = font-get-glyphs to calculate glyph width, but that doesn=E2=80=99t = always work (you can=E2=80=99t always get a font object from a face). Yuan=