From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix placement of toggle and radio button in Lucid menu. Date: Mon, 28 Feb 2022 09:45:49 +0100 Message-ID: <87ee3nz8ea.fsf@elite.giraud> References: <87sfs87i5o.fsf@elite.giraud> <87pmnc7f5c.fsf@yahoo.com> <87k0dk7ejd.fsf@yahoo.com> <878rtzb3hr.fsf@elite.giraud> <83h78nqguu.fsf@gnu.org> <87wnhj152u.fsf@elite.giraud> <83a6efqepd.fsf@gnu.org> <87wnhjdmxe.fsf@elite.giraud> <831qzrq9j0.fsf@gnu.org> <87bkyvdkif.fsf@elite.giraud> <83y21yq4zj.fsf@gnu.org> <87h78m5vfg.fsf@yahoo.com> <83sfs6p2ie.fsf@gnu.org> <87sfs63ws4.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24545"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (berkeley-unix) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Feb 28 09:48:48 2022 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 1nObi4-0006Fe-Gr for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Feb 2022 09:48:48 +0100 Original-Received: from localhost ([::1]:51548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nObi3-0002NQ-1q for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Feb 2022 03:48:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nObfM-0000iU-Od for emacs-devel@gnu.org; Mon, 28 Feb 2022 03:46:00 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:26267) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nObfK-0008JA-NV; Mon, 28 Feb 2022 03:46:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=VaZs5h59qW9BM5MG Ohi2Sg9+ETywhbgalKHVBBbEIDw=; h=in-reply-to:date:references:subject: cc:to:from; d=ledu-giraud.fr; b=FvCG/RPl5verBGoNaS47wg6SvEmjaq3GzNpLPf usaL4VkulZQ+p+i4JnPAeiLaN0U0FUajznw0hLsY3EfybqIZMPFHQ2JktsPuVKUdhVGuGw LDC4s7dzzG6KobOLyB1ujwYxim5JYXbCZLngkkIx2K5QvKrCUOSrKb1tu4ahnn18AH+c2Z 4bF7DU0on8oDTMyy0aDGFcQ/HbwzK3UT83FJhQkoPrizHljxREbvsRCs1/Lb93pJUjzBxH cjsj+zwxGKzdfohJ3qsUZIWYckgubaBjr9izlttjS/+sWdRgwxJVCTV2x+pjs7j9L598+A m+4Fu4Vw2+6dCNDMU5j6Hy9A== Original-Received: from elite.giraud ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id edff8393 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 28 Feb 2022 09:45:51 +0100 (CET) In-Reply-To: <87sfs63ws4.fsf@yahoo.com> (Po Lu's message of "Sat, 26 Feb 2022 15:35:39 +0800") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:286722 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I think I've finally understood what you were trying to explain to me =F0= =9F=98=85 First, yet another screen shot: --=-=-= Content-Type: image/png Content-Disposition: inline; filename=shot.png Content-Transfer-Encoding: base64 iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAMAAAC3Ycb+AAAABGdBTUEAALGPC/xhBQAAACBjSFJN AAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA0lBMVEX////v7+9AQUiPj48A AADm5ua/v791dXWmpqawsLC2traioqKtra2oqKijo6Orq6uhoaGzs7Obm5tzc3PswrzlsKfIVkP+ /f3dl4zJVkTGTjv99/fWfnDJVUT57evOaVnIVEH139zKXEvHUj7IV0TGTzvIVkTJVUPqwbrHUD3K WUjy19LHU0DMYlL35+XSdGX78/LJV0Tai3/+/Pvjpp346ujRcGHjqZ/14d7+/PzPalvGTj314N3/ /v3QbV3oubHJV0X78vDKWEbbjYLHU0HGTjxG8mt8AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+YCHAc3 EOQ5T60AAAAQY2FOdgAADwAAAAhwAAABkAAAAAD8jOTOAAAKW0lEQVR42u2dC5fUNBiGB1BXFgFR 2WVH8YbscgcVL+Bd8P//JcFxT9tpkiZp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TpChueCEDUhr169fp1DSL7IskVP2HIiBCF+Qk5OttuaI8tvgRCCkFgh //yTR8hSt70IQUheIdutemT1t9cgxH0uCGlFSLrIQghC1igkTWSdt9mn47ecYZpzX9SHRwy3ENKK kHmR1d82Tce1h22BTLV8+oa97pFDlJiPQkgrQuIjq20QIoZgZLUNQsQgssRAiBhElhgIEYPIEgMh YhBZYiBEjH8Bigpo4uqU3goAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjItMDItMjhUMDc6NTI6MzEr MDA6MDDRftB7AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIyLTAyLTI4VDA3OjUyOjMxKzAwOjAwoCNo xwAAAABJRU5ErkJggg== --=-=-= Content-Type: text/plain Here for each menu entry, I have prepend two unicode characters ('FULL BLOCK' and 'MEDIUM SHADE') that, I think, is showing the full extend of a given font. With those "full block", we can see that the toggle button is correctly placed: at the middle between the baseline and the top of the font. But I still find it to be high regarding the text label. I have tested with other fonts with the same result because the capital letters were always shorter than the full ascent of a font. So here are the options I think we have now: 1- Compute the ascent of each label (ie. max ascent of each character) and use this value to place the button; 2- Compute a global ascent for all labels in all menus and use this value; 3- Place the toggle button on the baseline (not at middle of baseline and top); 4- Leave it as is. Regarding option 1, I understood that having the metrics of a given character is not yet available in the backend. Plus we probably end up with non uniformly placed buttons. Option 2: Fix the "uniformly placed buttons" but is that even possible given how dynamic Emacs menus are? As you guess, option 3 has my favour. It fixes my aesthetic issue without more computation. In fact, I don't even undertand why those buttons need to be placed in at the middle of the baseline and the top in the first place (maybe I need an explanation here). If we stay with option 4, I still think that the toggle button should be 2/3 of the ascent and not 2/3 of the height of the font. Best regards, -- Manuel Giraud --=-=-=--