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: Variable pitch text filling Date: Wed, 1 Dec 2021 18:07:33 +0100 Message-ID: References: <87ilwft1ph.fsf@gnus.org> <837dcv2c2c.fsf@gnu.org> <875ysft0l3.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2262"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 01 18:22:54 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 1msTJm-0000KT-LE for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Dec 2021 18:22:54 +0100 Original-Received: from localhost ([::1]:45052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msTJl-0007Vc-8d for ged-emacs-devel@m.gmane-mx.org; Wed, 01 Dec 2021 12:22:53 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msT5B-0000aQ-EE for emacs-devel@gnu.org; Wed, 01 Dec 2021 12:07:50 -0500 Original-Received: from mail-pj1-f44.google.com ([209.85.216.44]:55248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msT59-0002I7-7y; Wed, 01 Dec 2021 12:07:49 -0500 Original-Received: by mail-pj1-f44.google.com with SMTP id np3so18468668pjb.4; Wed, 01 Dec 2021 09:07:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=m5/cCACBCF+/8QVeWgQ//9f9A741VKSiotH0ge5AULY=; b=hxdLyzNOZqlC8L3v93+VSFzdnKjT4DQ1mBjy8J6oFWtHWlxz/YSxp8itbpCcrDvFYK iHhYXaah0w8BCa6w66Po7C5aL0QC20h7krPit5CbzA5yJxTgSPqLJT3Kk3GD1Gylc8pB LxgY5W9jR1tafIFVT6ODy9i+EjKe4zW6nLKViLb0qwHlPcELwipBhdkWn9sjRS25yNhA CU2XltV2C8ymasKjIFv/xk/wbJgIVCAHZugrCvM9x7qXM9IVbbwPeD/oHa72BEa2M3Hp wjW6mvbbhY0rxmTnXgrZXwQL6+fkRcDEHWrdf0xrVEgCIOVuAI2Xxk/cIyJdCtpELuhM kBww== X-Gm-Message-State: AOAM531fQanlvIBzW066Bocu4e3Mz0iITmdg1/hERqDdBmey7jP2JSG0 pyu6Z7qbM8pJ5A6nc9xoWejXa9vTZue/AblbJsY= X-Google-Smtp-Source: ABdhPJwcBHt9xK1y+wsE1qjs6ApFBwyXvMd7zLZpluSpQinrzhMDVCxMS+N3M7uwFieRe4xjCzZHUP1XNx+BtLwRDcA= X-Received: by 2002:a17:902:e294:b0:143:86a8:c56d with SMTP id o20-20020a170902e29400b0014386a8c56dmr8759810plc.22.1638378465451; Wed, 01 Dec 2021 09:07:45 -0800 (PST) In-Reply-To: <875ysft0l3.fsf@gnus.org> Received-SPF: pass client-ip=209.85.216.44; envelope-from=stefankangas@gmail.com; helo=mail-pj1-f44.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" Xref: news.gmane.io gmane.emacs.devel:280651 Archived-At: Lars Ingebrigtsen writes: > Yes, if we're distributing the extra space on the space characters only, > we can use space specs. But usually typesetters don't do that -- they > also distribute some of the space between other characters, too, to get > a more even "greyness". (Or whatever they call it -- it's been a few > years since I read up on typography last time.) Graphical design software also hyphenate and use other non-trivial tactics to get justified text right. The main problem I see is that unless you go down that road seriously it's easy to find a solution that'll look rather bad in many cases. For example, IMHO most web browsers fail pretty badly at this, as does many word processors. For starters, they don't hyphenate, but just add more space between words, which is exactly the thing you'd want to avoid: you end up with "rivers" of whitespace in the text. Try this in Firefox or some other web browser to see what I mean: https://developer.mozilla.org/en-US/docs/Web/CSS/text-justify IMHO, I think we'd at the very least need a hyphenation feature to do a somewhat proper job. This is unfortunately hard to get right, as hyphenation rules differ depending on languages, and there are even different preferences within the same language (we have two main methods for hyphenation in Swedish, both equally accepted). Anecdotally, I have used Adobe InDesign extensively (proprietary software, sorry) for book and magazine production, and over the years I have amassed hundreds of custom rules for words where the default hyphenation engine did a suboptimal job in my eyes. That said, maybe we don't care to do better than, say, Firefox. In that case, the job is of course much simpler.