From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: What is `image-compute-scaling-factor' for? Date: Fri, 25 Dec 2020 12:12:14 -0500 Message-ID: References: <63B86086-94CB-4E10-9F62-E3F0C563FFB5@gnu.org> <83wnx7ntxe.fsf@gnu.org> <87o8iiihvf.fsf@gnus.org> <87czyyh0nl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33207"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , Eli Zaretskii , emacs-devel To: Evgeny Zajcev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 25 18:14:13 2020 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 1ksqfN-0008Zi-0J for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 18:14:13 +0100 Original-Received: from localhost ([::1]:32834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksqfM-0001t9-0s for ged-emacs-devel@m.gmane-mx.org; Fri, 25 Dec 2020 12:14:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksqec-0000zX-T5 for emacs-devel@gnu.org; Fri, 25 Dec 2020 12:13:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksqdd-0001om-UB; Fri, 25 Dec 2020 12:13:25 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B925D4405D2; Fri, 25 Dec 2020 12:12:23 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 84E7E4402F6; Fri, 25 Dec 2020 12:12:22 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1608916342; bh=UBZwczz+N5T+3kunFZW6LiD8dKvnvt7Zk6k+7e+c4vE=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KO8Il5ScDx+Z87YicKApUF7t+Hv6zTDMcRwMBjr3i+qjcFLHGOJGqtg49Qlz5ewCL eDgIA5r1c+YavE+8HQSyAVOEEKBuWs5/rIl1elvegiIfkUqHxfnGwlvz2wxMF5133b q195fA0q3wPbRWw7EOP0818o9z9NTJiAnl0ppNvi/xSlGcHDETL1REwH28X5qDNcl/ co7HSY3LgtEJGlhOna6rkdL9SFZp9u6lCLSSugfFMm3ZiMWyzmrsxR/kQkMbQEK4UI Tl+x2Y658C6J1uEPar8E/LLRsg5Xq/dZlo/mXE9o+mGNd+1FPHkH9bULSxrIzrRSV3 YqngC47KRnMSQ== Original-Received: from alfajor (unknown [104.247.243.191]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 365F8120515; Fri, 25 Dec 2020 12:12:22 -0500 (EST) In-Reply-To: (Evgeny Zajcev's message of "Fri, 25 Dec 2020 09:36:13 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:261754 Archived-At: > something new. None of the software I've been using does so. You can set > any default font size in Mozilla/Chrome/Opera without affecting image > sizes, but if you do "zoom-in", then everything zooms in, text and images. I suspect this is comparing apples and oranges: images in HTML pages are inserted via elements that provide additional information about the intended size of the image, whereas the current ELisp API has no such information so all we have to go on is the pixel size of the image, which is fundamentally insufficient to do a good job. IOW we ought to fix the APIs so that inserting an image has to come with either a scaling factor or some size info expressed in "char-cells" or "inches" or "percent of screen size" or "percent of window size" or some such entity. Stefan