From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <9front-bounces@9front.inri.net> X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: ** X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS autolearn=no autolearn_force=no version=3.4.4 Received: from 9front.inri.net (9front.inri.net [107.161.22.3]) by inbox.vuxu.org (Postfix) with ESMTP id 0D46121D37 for ; Tue, 21 Jan 2025 00:30:26 +0100 (CET) Received: from mimir.eigenstate.org ([206.124.132.107]) by 9front; Mon Jan 20 18:25:22 -0500 2025 Received: from mimir.eigenstate.org (localhost [127.0.0.1]) by mimir.eigenstate.org (OpenSMTPD) with ESMTP id 39cdca7a for <9front@9front.org>; Mon, 20 Jan 2025 15:25:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=eigenstate.org; h= message-id:to:subject:date:from:in-reply-to:mime-version :content-type:content-transfer-encoding; s=mail; bh=fDpLBbxZNVGV 7LH6CLef7tmFnvY=; b=JBJVTIYjcyZF/hWtR6FsEh4SZMnKB+3cCO6QKCpj4YLz 3LIlL/Onw9bTwn7mVHFMwXjLKmsv6YmeZwpWXXBWK44XfmyB/pqZt1ZCqB1oqqM5 Q6zY4hPbMwPnjY91+JxUVDz0+eDXy8V3yOHyZuTM1ltgQlGttRUA2VsFranGfzs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=eigenstate.org; h=message-id :to:subject:date:from:in-reply-to:mime-version:content-type :content-transfer-encoding; q=dns; s=mail; b=VCVcxL7LxZlSkgB3c2M g0Boh99vohdmvOxoZ3cfnDgOpwvzl5qhW5E9OBYbAmAQWLTqWDIETz7fufV9bKoo 7WLNuLWlpsHiXC+Rcenh2dvpUf1yWeW3GwDobeINdUCGQ7aBqJYfUNLE2JBEYADX nd8sQYsWAjbNxrSgyIuCaClY= Received: from chainsaw ( [4.15.76.73]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 891f3212 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Mon, 20 Jan 2025 15:25:20 -0800 (PST) Message-ID: <2005A135F30371D7D79F64B86158513B@eigenstate.org> To: 9front@9front.org Date: Mon, 20 Jan 2025 18:20:57 -0500 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: extended base scripting layer Subject: Re: [9front] Truetypefs anti-aliasing Reply-To: 9front@9front.org Precedence: bulk Quoth Paul Lalonde : > libttf might still have a bit of life in it. I have another set of patches > that adds 8 bit support and am part way through changing the rasterization > to compute coverage analytically. > That removes the need for the truetypefs and ttfrender supersampling paths, > and makes it cheap to perform the coverage calculation at three different > offsets for subpixel coloring. > I think this is a more invasive change, requiring an API change to libttf, > adding a depth or format parameter to the allocation calls. I think that libttf isn't currently linked into anything other than truetypefs, so it shouldn't be so hard to get away with with incompatible changes. It's up to you whether you think it'd be better to put a bunch more effort into libttf or to work with sigrid to get fnt in shape to replace it. > If we want to do subpixel then it's probably an even more invasive change, > using a full format specifier to allow libttf to generate r8g8b8a8 (r, g, b > for subpixel, raw coverage in alpha?), and then changes in devdraw and > drawterm support the correct compositing. don't forget vncs. > My opinion is that the short term "make truetype work" is to use my > truetypefs patch. The next step would be to move the coverage calculation > into libttf, in hscan(). The subpixel change is so invasive that I'd > prefer to wait (and perhaps help with) for the full do-over Sigrid is > working. I'd be happy to commit this and libttf bugfixes. I can look over this patch by next weekend, if nobody else gets to it first. > Are there any other users of truetypefs? It's now my daily driver for > rio/acme, with Kurinto and Go fonts in regular use. Though some the > Kurinto fonts have some problems in hinting which crash libttf. I use truetypefs, but mostly when giving presentations; it's the only option for a font big enough for a slideshow. > Thoughts, Sigrid? > > Paul > > On Mon, Jan 20, 2025 at 9:53 AM wrote: > > > Quoth Sigrid Solveig Haflínudóttir : > > > The more common way to do it, I believe, is to render 3x the size > > > (on either X or Y axis, depending on your display's pixels) image > > > of a character, then apply a FIR to get rid of as much color > > > banding as possible. > > > > > > https://git.sr.ht/~ft/fnt does exactly that. The sources are there > > > for anyone to explore and contribute to. > > > > I the path forward may be to port truetypefs to this, and then > > remove libttf -- Sigrid, thoughts? > > >