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: How much is one em (image size unit)? Date: Fri, 31 Mar 2023 19:38:25 +0600 Message-ID: <87y1nddory.fsf@disroot.org> 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="35519"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 31 15:40:04 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 1piEz5-00090p-NM for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 31 Mar 2023 15:40:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piEyg-0002lV-BT; Fri, 31 Mar 2023 09:39:39 -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 1piEyc-0002lC-QY for help-gnu-emacs@gnu.org; Fri, 31 Mar 2023 09:39:34 -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 1piEya-0002PD-Ug for help-gnu-emacs@gnu.org; Fri, 31 Mar 2023 09:39:34 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 32ADE401B0 for ; Fri, 31 Mar 2023 15:39:30 +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 KU6FeWFf14JB for ; Fri, 31 Mar 2023 15:39:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1680269968; bh=g4NsUmTsyIDu0Q69MNZbK6mg+H87KfNBsZefCnyjTkg=; h=From:To:Subject:Date; b=SxXIIaNWb65KLEwaVGa8srdXbbbEgimxyqn3uH3IK7DrkC3s1uXKmmFguZ2OWVerk sTE9q2jEUl6/ujiIOaz8HLWPttP9x62rSsCYPmeuw9aUsbaOSsvj5zt2SWhIfo7Rey kSM28dv5m6ph32OG6qAp6s6P3BFMjjdSIAWq/oK5Bd11YtPLzcPal+3joairRGQWyM Wn8TMEZdmkhuBCJhJzUk3l3ZXnrJ5olkkkrikepnezgfweBg403hek2lTIGO98SKuA A1Dm6ow5wWQJ4juZ/0EymHTmhabZirC0fgch8M6aU3sxfWq/ZyWFMN+i9G9eE+6+1Q QRC0oUHKImnaA== 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:143181 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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? So far I've reached till this: =2D-8<---------------cut here---------------start------------->8--- (insert (propertize "f" 'display '(image :type xpm :height (1 . em) :ascent= center :data "/* XPM */ static char * blarg_xpm[] =3D { \"16 7 2 1\", \"* c #000000\", \". c #ffffff\", \"**..*...........\", \"*.*.*...........\", \"**..*..**.**..**\", \"*.*.*.*.*.*..*.*\", \"**..*..**.*...**\", \"...............*\", \".............**.\" };"))) =2D-8<---------------cut here---------------end--------------->8--- =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----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmQm4lEACgkQVTX89U2I YWtH0Q//XChoT4y9shvDGXizVcAA3YvO846ONtgowcxVafsJDcOOkZ6+W7+8MNKz 9oWeOVt4Q4Pk/+jr7H4/ykfiNh4mqOXhzm2EeO/pg8GZrap5ovX/D99oDXZCt9ei 3fhyuEoe6pLLmNLAS79YImEHY1X0ZEQexXlF7YYm4NPukfCb2Xzq+EADl5Uoo41T uD8fOsQWti2inJND73cgzIjA9xq8KywBgM/lxrA85Ty85c7IAaFdN1ws/faol1Ui Z++ZT0/Kno1Zt2Qxzo7x0+D7v1FjeWa7YljgjWi4K1tmIxJ8wOw3GchoZG4316n2 upLNCvH6CxwET6COmoBDeMJsxOWI13QGyW/KP9pD1cm0EyTSSl5nVOTg3kX8OI7S z3UICSPmiw7PMOROmSTB1y8vU4+RXz6h9/VCuAEdHzdNpkMaChgy1kdZIHwkPuv8 60MeZBe75Iadzu/my/3MfvWERSYvsFw2QVcdvXco9XPWoWS69LjPxGdYy8Zk8u6m AJG4wi0AQjcEgqd/kK6ve67mCdLTcomLYVRU8ydzsDi8Vr+74fFgsP/ZvRX2MHvs kHqCB1Bd5FStPWMbs+wcgQMnofJhKbVhLsyjyVweCnPouf5SqggorqnFqRDAF/CW owJoZKKvlsc+rkZpTwUf/JkVLF3+MZp983Me0R+sW2p8yM7BWSY= =jL8w -----END PGP SIGNATURE----- --=-=-=--