From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Anand Tamariya Newsgroups: gmane.emacs.devel Subject: Font size Date: Tue, 20 Aug 2024 10:55:45 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007d1e55062016abe3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39460"; mail-complaints-to="usenet@ciao.gmane.io" To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 20 07:27:27 2024 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 1sgHOw-000AB7-I5 for ged-emacs-devel@m.gmane-mx.org; Tue, 20 Aug 2024 07:27:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgHOG-0007NV-I0; Tue, 20 Aug 2024 01:26:44 -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 1sgHOE-0007Mx-Hq for emacs-devel@gnu.org; Tue, 20 Aug 2024 01:26:43 -0400 Original-Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgHOC-00022u-AK for emacs-devel@gnu.org; Tue, 20 Aug 2024 01:26:42 -0400 Original-Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-3dc16d00ba6so3087170b6e.0 for ; Mon, 19 Aug 2024 22:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724131599; x=1724736399; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=fBgLwzLAFEoVu3GZYR7ykZdmg90tlCQU0cMc8OS6wI4=; b=lANZ+e0Gb/s3MOWLQG/ki0kd10CVXFu71fPI0vwZLfjlRR4mBg5VINdpy532YNr/Gb 4edjAeGZyF7e5xoCDqRJP0gyAqP8zMLMTj3nljFyIDDQYMrqkrIRSDklk4OnqZKhBBcF 7LY24QYonkwmbG91HzrTxTn/3UOOl8C98mOL3jk+HEZ0kv2GA88ZmRHCSM3AsJtysjto mmM3atDDraiRv1NuYqGOvFw8pZQvn2ugbrICJVl+stOhE8cEjFF1MYYdNeL8iutdB76A vMb+oVjrSYASCMObjaFezRebWUwhzdD76N2V8+s91ueYFRmsqhs8vo1epjIGJOVWb/vd hRpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724131599; x=1724736399; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fBgLwzLAFEoVu3GZYR7ykZdmg90tlCQU0cMc8OS6wI4=; b=ITwmUDqUpWvUVeYwxa4a6COTfIPP81uplbsOouBNUKWKQZsHQZzGhgVGYyEFLTjvXW BWnsU7yH+7juud9Hc7HKMF0bWaj6aFlPKx+hytDKpc2TU43OjlvfiJg/twpGEf+WGarn KbwfdGo+zlC2IgLJk/unEYTEPHrp7sUJ0hcns9lyjJeFRWrHgmkkW+T5x/hrvDzN+4gg PsNJNGVSx6mRdq7p132K25aLuSYF+ocpeLAFMJK9JygdleuFVdEyHdBf0RjaXj1PlJLS 8Z6DeJjOmi6r+PXRvCVTuWQtqKESs9rC9Rxek7K8qmPsNpB3jqXfRVVXJvga9Hs2j1ma PEBw== X-Gm-Message-State: AOJu0YzuhlbTG+Mrisd9C1B8HXshPR+48zXBVFgNIciLw1AxWpPIExZN mol11efp9r3oRpeMLp35GfCnMONcHoHUdXbS6GOa9pSGNtpNzMkypxdQaNSY5TQ7X+G/liAJZNf y+zOs4Cb2Gu/YnGsXHXerUn+qIRZN8C1n X-Google-Smtp-Source: AGHT+IEwDNQMpXFDdGcKXKAnVjGeGNHO2Lw2OIQbULGyXjRM4C52wr4VEYijYPAlTbZfDaMlOCSTa0JomhF7BIocBQs= X-Received: by 2002:a05:6870:2105:b0:260:f50e:923f with SMTP id 586e51a60fabf-2701c5ed08emr15143212fac.42.1724131598734; Mon, 19 Aug 2024 22:26:38 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::231; envelope-from=atamariya@gmail.com; helo=mail-oi1-x231.google.com 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322952 Archived-At: --0000000000007d1e55062016abe3 Content-Type: text/plain; charset="UTF-8" Why does this API keep increasing the font size? With a selection, try the test command. Alternatively, what's the best way to query the font-size at point and re-apply using face property? font-info [ OPENED-NAME FULL-NAME SIZE *HEIGHT* BASELINE-OFFSET RELATIVE-COMPOSE DEFAULT-ASCENT MAX-WIDTH ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH FILENAME CAPABILITY ] (defun test(start end) (interactive "r") (let* ((size (* 10 (aref (font-info (font-at start)) 3)))) (put-text-property start end 'face (list :inherit 'unspecified :height size)))) --0000000000007d1e55062016abe3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Why does this API keep increasing the font size? With= a selection, try the test command.

Alternatively,= what's the best way to query the font-size at point and re-apply using= face property?


font-info
[ OPENED-NAME FULL-NAME SIZE HEIGHT BASELINE-OFFSET RELATIV= E-COMPOSE
=C2=A0 =C2=A0 DEFAULT-ASCENT MAX-WIDTH ASCENT DESCENT SPACE-WI= DTH AVERAGE-WIDTH
=C2=A0 =C2=A0 FILENAME CAPABILITY ]

(defun test(start end)
=C2=A0 (interactive "r")
=C2= =A0 (let* ((size (* 10 (aref (font-info (font-at start)) 3))))
=C2=A0 = =C2=A0 (put-text-property start end 'face
=C2=A0 =C2=A0 =C2=A0 (l= ist :inherit 'unspecified :height size))))

--0000000000007d1e55062016abe3--