From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.help Subject: Re: How much is one em (image size unit)? Date: Tue, 04 Apr 2023 15:41:06 +0600 Message-ID: <87y1n8j87h.fsf@disroot.org> References: <87h6u0eqj9.fsf@disroot.org> <056F7BFD-795F-4955-85CD-E7243020DFE8@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35784"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , help-gnu-emacs@gnu.org To: Fu Yuan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 04 13:18:48 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1pjega-00098b-1I for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Apr 2023 13:18:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjeg0-0004eJ-81; Tue, 04 Apr 2023 07:18:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjefy-0004e3-Vu for help-gnu-emacs@gnu.org; Tue, 04 Apr 2023 07:18:10 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjefw-0008Cr-Pa; Tue, 04 Apr 2023 07:18:10 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 5054440E7F; Tue, 4 Apr 2023 13:18:05 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 38oi5lIZaH0T; Tue, 4 Apr 2023 13:18:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1680607083; bh=cFjMKgR6GxutPhGZVDX/MyVkXNpfU6vOyzM8nb7cuFI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=U7Un53++o1o0+rhGZmgd46B0DH+IJJOaCkzFCNhOJLa35E1z/vOFh6P7mBUF+fMn2 1Gbpxh0Tz1W6DpDk7cIIVea0dLtsr00hZV6CZ6ThAO/JjPwrz/T6uM17tXstFauTTT pxS3VhKAyOfVASfpVjVxuynkOolIrRtDeGEgOb2m7oUJ9Y7l6h7xyxkzW80KKjwpob lmA+rNpiRGRgmnNubANlZHze9SldC4lHC/HJB2+O+MxxJLc4Fup/n9rHKfFmqylrXf EKjl50XaIDU2vRlMVQyBW2oWcihKlCjpCsdUmTGa1Itn34JUGPpcPwPkl0osKVZ0aG YcYwItuNDdiAA== In-Reply-To: <056F7BFD-795F-4955-85CD-E7243020DFE8@gmail.com> (Fu Yuan's message of "Sun, 2 Apr 2023 15:27:05 -0700") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org 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_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143212 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Fu Yuan writes: >> =E5=9C=A8 2023=E5=B9=B44=E6=9C=881=E6=97=A5=EF=BC=8C=E4=B8=8A=E5=8D=885:= 35=EF=BC=8CAkib Azmain Turja =E5=86=99=E9=81=93=EF=BC=9A >>=20 >> =EF=BB=BFEli Zaretskii writes: >>=20 >>>> From: Akib Azmain Turja >>>> Cc: Manuel Giraud >>>> Date: Fri, 31 Mar 2023 22:32:49 +0600 >>>>=20 >>>>> Akib Azmain Turja writes: >>>>>=20 >>>>>> I'm trying to show an image such that it has same height as the text= and >>>>>> resizes relatively with text scale. I've achieved this with the 'em' >>>>>> unit as described in (elisp)Image Descriptors. But 1 em seems to be >>>>>> pretty smaller than the font size. How to figure out correct value = in >>>>>> em unit such that image and the text has correct height? >>>>>=20 >>>>> Hi, >>>>>=20 >>>>> FWIW, your example works for me and scales accordingly when I zoom. >>>>=20 >>>> But 1 em is pretty smaller than the default font size. I want to make >>>> the image height and the text height same. >>>=20 >>> Maybe this page will help you: >>>=20 >>> https://learn.microsoft.com/en-us/typography/opentype/spec/ttch01 >>>=20 >>=20 >> Thanks, but I couldn't understand much. Say the line height is X em, >> then how can I figure out that X? > > 1 em equals to the text height. If your 1 em looks smaller than the text = height, something might be wrong. Perhaps post a screenshot of what you get? > > Yuan=20 I have found the size of em unit, it's actually the font size (as in the the SIZE argument of font-spec). So, line height in em is: #+begin_src emacs-lisp (/ (float (default-font-height)) (font-get (font-spec :name (face-font 'def= ault)) :size)) #+end_src =2D-=20 Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5 Fediverse: akib@hostux.social Codeberg: akib emailselfdefense.fsf.org | "Nothing can be secure without encryption." --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmQr8LMACgkQVTX89U2I YWtPSg/9GSd7PLpvsx+V4rPcgytGTLohXLLWbOX1cyZ/bZyMyD32zEoW3+mrJxI8 qXV1JDQnPm9DEFdPKKva0zi3iB/QSovY0r25Tf6TCjl65w7WrUprdce5YzS6FS8U Bju8i0npYsVIAz1PU5hzkYcrPibWrmEDu6lUrs0k0oCbGTrKwB+9K7pTKr+XF2Bv EJWqysDJgRldKa2FT7TU1DhOVvAZjYq5Zmqp29otWH5hQg7gPQX80eumOCh1Y7ni lygfwGP3TWmXR4svXxFwJFiiICHMOnnC7EErbf2fxalH/FGEnVLfPWU5MqVfu36n jqE6vwlF4PPk+WUyjg775sKqP7EBKtWgjC6x7tUiZBJ7WZXftW9KJXfKLqVNuKOk lZL7rnbXw4/qSeT5NPIYv+CmLC/3/N0pw/tAZvXsm+gG9u7gy1tujZfAjwu+CXVa meMkeEmPkIkbiXwZolCstdKd32FwCElN+Snb7TtEBLQPj9CIMJkueZgsHwnbKJ8S d0xanwdq+LGWtE1uuxG+YBdscftAQ4QFgVPbavNjnHHqZWW7Yza/u4iaF3a1dX6d TxRAbnah3XZBAIu3p+YrRKrhKySVrkLN58/coBmexX4xtiWGcqSNW1FSznuo0XOn xv7tz9KFNHmRssYa+zoqnhwVeSbQtE+cTHmhp9g0vuSOBqf9cbs= =PLaj -----END PGP SIGNATURE----- --=-=-=--