From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Nicolas P. Rougier (inria)" Newsgroups: gmane.emacs.devel Subject: Re: ELPA: New package: svg-lib Date: Mon, 27 Sep 2021 22:43:01 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8945"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.6; emacs 27.2 Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 27 22:47:27 2021 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 1mUxX5-00027n-4Q for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Sep 2021 22:47:27 +0200 Original-Received: from localhost ([::1]:50756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mUxX4-0001Wx-49 for ged-emacs-devel@m.gmane-mx.org; Mon, 27 Sep 2021 16:47:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUxWW-0000pc-L1 for emacs-devel@gnu.org; Mon, 27 Sep 2021 16:46:52 -0400 Original-Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:61074) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mUxWU-0005rG-Do for emacs-devel@gnu.org; Mon, 27 Sep 2021 16:46:52 -0400 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3A0b2Uxq7n5KTe5RpCbgPXwMjXdLJyesId70hD?= =?us-ascii?q?6mlYVQFSeNeJjt3GppomPNHP5wr5K0tQ/exoWZPwJE80mqQU3WB8B92ftWrdyQ?= =?us-ascii?q?mVxeNZjLcKqgeIc0bDH4VmuJuIHZITNDS9NykYsfrH?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="530691016" Original-Received: from 91-160-114-139.subs.proxad.net (HELO M-E7-NPR) ([91.160.114.139]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Sep 2021 22:46:46 +0200 In-reply-to: Received-SPF: pass client-ip=192.134.164.83; envelope-from=nicolas.rougier@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:275617 Archived-At: Alan Third writes: > FWIW, I believe that librsvg defaults to 96dpi, however I'm not > sure > that it always did, I've a feeling it used to use something > different, > so different versions of librsvg may use different default > DPIs. Only > Emacs 28 explicitly sets a DPI, so Emacs 27 will use whatever is > default for librsvg. If librsvg changed its default DPI, that would explain why some users get a wrong result depending on their lib version. > I ended up using pixels for font sizes rather than trying to get > point > sizes to match up. When I DID try to use point sizes, on macOS I > had > to multiply every size by something like 72/96. That calculation > would > vary with OS and GUI toolkit, and possibly monitor size too. I went down this road too and remember having tested the 72/96 ratio without much success. More specifically, I try to compute the actual screen dpi and adapt the font size but it did not work so well. Nicolas