From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Proportional fonts in the mode line (one month test) Date: Wed, 24 Nov 2021 17:55:37 +0100 Message-ID: <87wnkxwl12.fsf@gnus.org> References: <87h7c1u0cg.fsf@gnus.org> <9B381C7A-A84D-4585-8D37-6CC8AE6511D1@gmail.com> Mime-Version: 1.0 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="22005"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 24 17:57:18 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 1mpva9-0005Rk-Qg for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 17:57:17 +0100 Original-Received: from localhost ([::1]:43476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpva8-0005TS-OT for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Nov 2021 11:57:16 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpvYh-00033g-5x for emacs-devel@gnu.org; Wed, 24 Nov 2021 11:55:47 -0500 Original-Received: from [2a01:4f9:2b:f0f::2] (port=48654 helo=quimby.gnus.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpvYe-0005hE-Pu for emacs-devel@gnu.org; Wed, 24 Nov 2021 11:55:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3sUeH/nk5i10ysq+JqnPKd2+E1em7Oie85LMueb5jE4=; b=kHJXi2gf5lhLmIYKbRpAHcSNNh ZXCycfezA4jG21ZabBQjVdLXuJ/wZB4GbJEMv2uUNlgRrz1sKVts6FDH+Z2yo9OMxgBMrqQycnwn1 osmeGl0SPIKujtpidTRWzAUSgUtQn0OqXzAbHQbC9EqB1mJbvDbqHDaxPiIFTGrZcCTw=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpvYZ-0003iT-4w; Wed, 24 Nov 2021 17:55:41 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXJyMayr7OWlKBX V2P28xr///9HRQ2EAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+ULGA8LEwQ2sdgAAAG0SURBVDjLrZPr deQwCIWFtwHADRipgYzoYE/6r2kvV35McpJ/y5mxZX1CvFu7RMXMVM+vrb2JgJrhKVbrc88oahJc eN1B5H12SuI/C0isS2szYsFOUCqqVhRXrCvdsYsteCMqTeyUEKfReqjIZR+u2dZON8q9S0HpFZey vt6EQCsi+w5g25AOpdqjWBpCh+Xe1cqDNw/4yR9UgmoVz51E7AB5WHgxebIrfuCh1geve0v7HqUX e97ZvVSYLSGAPj/krVp7hsDJpx4MHu/McD+vKtfX22A7P+qUPxYq9CZb5utLH+hKraK0syokzRY5 Tq25ZyrbZx3c4mynHJnHA2yfKvQgIVPuQtmKl2HMnMjyfmugA2ox8gBoMp6Oseoqz/zY42iSdCWu giK8MbeM9ie/1Xpkz8gJmzeIar8OlyrEGASXEQ+HQskFgl1A7gR9zGZ3w+JAh3WCPphitADOR8cb YNSgDLaBEZh3wJzj5QSqZyRRg2P5Gq/uAOw7GudIGXKFeQKgM6UgNWHlVa+ACtTi0uBwcvVMMpLo lcX+qnT66o2ouULgYGNN7d4+f5a/v4HP/wj+AQY+Z1k/V1ZPAAAAJXRFWHRkYXRlOmNyZWF0ZQAy MDIxLTExLTI0VDE1OjExOjE5KzAwOjAwXmLGugAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0xMS0y NFQxNToxMToxOSswMDowMC8/fgYAAAAASUVORK5CYII= X-Now-Playing: DJ Rupture's _Curiosity Slowdown_: "Curiosity Slowdown (part 3)" In-Reply-To: <9B381C7A-A84D-4585-8D37-6CC8AE6511D1@gmail.com> (Yuan Fu's message of "Wed, 24 Nov 2021 08:49:15 -0800") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:4f9:2b:f0f::2 (failed) Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 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, RCVD_IN_DNSWL_MED=-2.3, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:280017 Archived-At: Yuan Fu writes: > 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. Yes, I guess right-aligning text on the mode line is pretty hard (unless you switch to l2r on the mode line)? > And there is no easy way to calculate the pixel width > of a piece of text. There's `string-pixel-width' in Emacs 29 now, and it actually works now (after Martin's fix yesterdayish =F0=9F=98=84). --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no