From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/84459 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Scaling stuff for high dpi screens Date: Mon, 21 Apr 2014 10:58:09 +0900 Organization: Emacsen advocacy group Message-ID: References: <87vbu5m25o.fsf@topper.koldfront.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1398045574 8316 80.91.229.3 (21 Apr 2014 01:59:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2014 01:59:34 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M32705@lists.math.uh.edu Mon Apr 21 03:59:24 2014 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wc3Vx-0003cw-7W for ding-account@gmane.org; Mon, 21 Apr 2014 03:59:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Wc3Uv-0004zu-8w; Sun, 20 Apr 2014 20:58:17 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Wc3Ut-0004zh-RH for ding@lists.math.uh.edu; Sun, 20 Apr 2014 20:58:15 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) (envelope-from ) id 1Wc3Us-0002hH-RD for ding@lists.math.uh.edu; Sun, 20 Apr 2014 20:58:15 -0500 Original-Received: from hampton-mail.hostforweb.net ([205.234.204.210] helo=hampton.hostforweb.net) by quimby.gnus.org with esmtp (Exim 4.80) (envelope-from ) id 1Wc3Ur-00010V-Al for ding@gnus.org; Mon, 21 Apr 2014 03:58:13 +0200 Original-Received: from localhost.localdomain ([127.0.0.1]:57069 helo=localhost) by hampton.hostforweb.net with smtp (Exim 4.80.1) (envelope-from ) id 1Wc3Uj-002ERa-Ep for ding@gnus.org; Sun, 20 Apr 2014 20:58:06 -0500 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13001 (=?iso-2022-jp?B?GyRCPz8bKEI=?= Gnus v0.10) Emacs/24.4.50 (i686-pc-cygwin) Cancel-Lock: sha1:1DClbv8cyJpHHqOz9kXNeyQx0VA= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: acl_c_authenticated_local_user: root X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:84459 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable On Sat, 19 Apr 2014 23:37:23 +0200, Adam Sj=F8gren wrote: > I have a bad habit of procrastinating by buying new stuff, and easter > was coming up. > Anyway, that is neither here nor there, so: when you have a ~280 dpi > laptop screen (3200x1800 pixels on 13"), things need to be scaled to be > readable. How about the following ones? Note that there are some incompletenesses: - Emacs has to have been built with ImageMagick. - Specifying colors to an image, e.g. Gnus logo, doesn't work. - Not effective to some images that a program doesn't use `create-image' nor `find-image'. - Emacs' startup screen won't be splashed if an initial frame is not big enough for the image (but `emacs --maximized' works). --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defadvice create-image (after scale-image-size activate) "Scale the image size." (condition-case nil (let* ((magnitude 2.0) (image (copy-sequence ad-return-value)) (size (image-size image t)) (spec (cdr image))) (plist-put spec :width (round (* (car size) magnitude))) (plist-put spec :height (round (* (cdr size) magnitude))) (plist-put spec :type 'imagemagick) (setq ad-return-value image)) (error nil))) (defadvice find-image (after scale-image-size activate) "Scale the image size." (condition-case nil (let* ((magnitude 2.0) (image (copy-sequence ad-return-value)) (size (image-size image t)) (spec (cdr image))) (plist-put spec :width (round (* (car size) magnitude))) (plist-put spec :height (round (* (cdr size) magnitude))) (plist-put spec :type 'imagemagick) (setq ad-return-value image)) (error nil))) --=-=-=--