From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: Increase default `line-spacing' to 0.05, 0.10 or 0.15 [proposal] Date: Wed, 5 May 2021 14:17:01 -0500 Message-ID: References: <483dd6dd-d732-6f94-066f-9f07499ee430@grinta.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39430"; mail-complaints-to="usenet@ciao.gmane.io" To: Daniele Nicolodi , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 05 21:18:46 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 1leN2j-0009z5-Nh for ged-emacs-devel@m.gmane-mx.org; Wed, 05 May 2021 21:18:45 +0200 Original-Received: from localhost ([::1]:45786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leN2i-0007zs-RL for ged-emacs-devel@m.gmane-mx.org; Wed, 05 May 2021 15:18:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leN17-0006ye-Qn for emacs-devel@gnu.org; Wed, 05 May 2021 15:17:05 -0400 Original-Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:46061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1leN14-0004AO-TS for emacs-devel@gnu.org; Wed, 05 May 2021 15:17:05 -0400 Original-Received: by mail-pf1-x42f.google.com with SMTP id i190so2664975pfc.12 for ; Wed, 05 May 2021 12:17:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :content-transfer-encoding; bh=rf1g6rfNA4Bgckj3cfmMuVivSxa2L5/rtNH19BngSaA=; b=vh3SX491R3ePrvSKcAGpYNlIAstcaoYd+oamlVvgtp8UWlkqB876zD27XQUfWQPaF8 KYCkKQZXr/kA6Y9MfhsyXgmTTY+QR5EdzhCm0S7jP/gx0itdmyPku+gYYrzBDOpj3cs3 ZRJ1WF4fQIzq7y7dJo+Z2UAa3DMmGbcFnpzwLy48C9gtSc+OtQXKbpw5f3UuUQWs3Um2 7ryGrZlZMVAhq/ZiBmCeRhho+YxlLe6tm6rXHZeS2yJmVq8Bld9JV1sv5Uncpe6tO/vH 1OS3csw6KTiNId1RgPU+jQLQiaNyp7qV5T8faFhuQyN/8gknVFysxjhiwOI/qhV+ov7J 4CvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:content-transfer-encoding; bh=rf1g6rfNA4Bgckj3cfmMuVivSxa2L5/rtNH19BngSaA=; b=gyUsLoj8olfo2JsyBYojzd+5ygVEY8ydYzm61u94N8UY7mpR69FRufHOQ5wpOvhe4J L5kRxng3hVqptoColeiWmGIuMQEbuO7PEi4p4YVex85t9aXeLbJUFAzeKf1OOe8Z4VJT YwQGnvcjgT6yxGzz9lHTLzRHoFGtxHjv0nnAh6EHpQpsgdzH8MsrohGJ6V0t2grHKjmL pSry9KBgmuy/0pig5rdRfMZ2n5+HMXdO7iqk+bFowOK0cWALONBI2kZQcHM/TuTH2ZMb NaDubkjb4MWgJbRs5IqUIDWNUKP2PsM4tqZ4GiBI7DiMHQlk1hisMx44TEPrNdgfQGHa 2HTg== X-Gm-Message-State: AOAM5331LaLHmthtLSeu1iiNsabQRXknqJ/Ys2SbVQ242MB28FD//Ax5 v8MjnPoKXg16iMtdYvlBP9MqCSkEH1MFy2eAxrEfAbiR X-Google-Smtp-Source: ABdhPJzmY4BfDXSr5yU4Jw/iiyZ69WjoAfZwXMVQgNiCn3KgXnFpSCavxgEUmp0AbK/wHonQkwzUKemCkM1M6SHZzDs= X-Received: by 2002:aa7:8113:0:b029:278:dfa6:8ac with SMTP id b19-20020aa781130000b0290278dfa608acmr440540pfi.57.1620242221489; Wed, 05 May 2021 12:17:01 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 5 May 2021 14:17:01 -0500 In-Reply-To: <483dd6dd-d732-6f94-066f-9f07499ee430@grinta.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::42f; envelope-from=stefankangas@gmail.com; helo=mail-pf1-x42f.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, RCVD_IN_DNSWL_NONE=-0.0001, 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:268922 Archived-At: Daniele Nicolodi writes: >> C. A very conservative option is to use 0.05, which would be a small >> incremental improvement on what we already have. [58 lines, 3.33 %] >> >> D. The default. [60 lines, 0.0 %] > > On my system (macOS, Emacs 27.2 from https://emacsformacosx.com/) with > some fonts, these two settings produce the same result. It seems that > the "resolution" for this setting is 0.1 (thus 0.5 is rounded to 0.0). I tested this on my macOS machine with a build from Homebrew, and one built from the master branch. In both these builds, 0.0 and 0.05 are the same. (0.1 and 0.15 are different, though.) So I guess for this to matter on macOS, we would need to change this to at least 0.1. > In general, the visual distance between lines depends on the font: with > some fonts I use a line-spacing of 0.0, while others require setting > line-spacing to 0.15 to obtain roughly the same distance. Yes, this will depend on the font. Properly speaking, choosing the value should be a manual endeavor. But I don't think this is something we can easily do in Emacs as things stand. We would first need to build some infrastructure to change line spacing depending on the font used. Barring that, the best we can do is to find some happy average that works okay most of the time. A true ideal line-height doesn=E2=80=99t exist, because every type- face is different. You need to take into account the design of the typeface as well as the typesetting. Is this a wide or decorative typeface? You may need more space between lines to let the details breathe. Is this a narrow text column, as you might see in hanging captions in an article=E2=80=99s margins? You could use a smal= ler type size and keep the line-height tighter than the article text next to the caption. By observing these factors, you can judge what a particular setting requires. A good starting point with line-height is about 1.2=E2=80=931.8 ... It takes some trial and error to see what=E2=80=99s right for a given type= face at a given size in a given situation. I find it useful to declare a line-height and see how it feels to read text at that setting. Do letter ascenders and descenders crash into one another or run a little too close between lines? If so, more line-height is needed. Are the spaces between the lines more prominent than the lines themselves? If so, try reducing the line-height. When you find an appropriate line-height, the text will seem to fall into a natural rhythm, feeling neither too far apart nor too close. - "On Web Typography", Jason Santa Maria, A Book Apart, 2014.