From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: Ligatures Date: Tue, 19 May 2020 15:52:45 +0000 Message-ID: References: <20200517124125.000013a4@web.de> <97C7EAB7-10AB-4702-ABC8-EB6C1C50ABDB@gnu.org> <20200517165953.000044d2@web.de> <83lflqblp0.fsf@gnu.org> <83ftbybio3.fsf@gnu.org> <83zha69xs2.fsf@gnu.org> <83367x9qeq.fsf@gnu.org> <83y2pp88lw.fsf@gnu.org> <87f0bfdd-668e-a5f9-6825-818d93a8a03d@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="00000000000074a2e205a60247f3" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="94278"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: =?UTF-8?Q?Cl=C3=A9ment_Pit=2DClaudel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 19 17:56:07 2020 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 1jb4b9-000OQs-4z for ged-emacs-devel@m.gmane-mx.org; Tue, 19 May 2020 17:56:07 +0200 Original-Received: from localhost ([::1]:44972 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jb4b8-0001ID-6Z for ged-emacs-devel@m.gmane-mx.org; Tue, 19 May 2020 11:56:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jb4YY-0005av-T0 for emacs-devel@gnu.org; Tue, 19 May 2020 11:53:26 -0400 Original-Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]:42147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jb4YX-0000o2-Sb for emacs-devel@gnu.org; Tue, 19 May 2020 11:53:26 -0400 Original-Received: by mail-oo1-xc2f.google.com with SMTP id a83so48853oob.9 for ; Tue, 19 May 2020 08:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5dTT7Z7xXBx3RFx00GJ9k3zb3UoRptsP/dizuusawfY=; b=POJygoNxgKnV49Z01plHJDoU76+8UxfZ7nhQO+ULHDksf10EwcUytJHCf65EeHFdvW Hn3Q5EFF/iAfbdGDySeBTFXEoFTL5NxipgqefBbeHPTsFMoEPyDuTPZM9PnhYEYvn0w1 G272tkn6nYpGJhC5CmIJHMsvINEbta0x1qWOQhcXgDKBSEyIAnSEOSiYjT+lZnzjMZP5 /M6Tz2QoPIMaFFNWPjS8QfKxECEly/p4y1nXoM552X4Sp5IbrWDmG7IY8YyQQEAyD4LE WLFUGdbnb1RDIMVrEDOf0yHTBA9BZmOeQh5EinA04sMZ2JSvCIqU5vq4p7RtWpjed6tp nVYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5dTT7Z7xXBx3RFx00GJ9k3zb3UoRptsP/dizuusawfY=; b=hx8Er5Fi90voZJlKwoF5VwD6go+gae+Y4sn8zZdVABJzbNvGss34SyLyKhjRwXcxry OqmWMVxEcAzq88ciqZbewz9+RRPb9yGZm9JiGCTWFmZBb2fybnfDg2izKqGYVjKAza/w zbI4atRUQnKjtevMgt0TgvMgQY+VLI7Isx09OQUs9VNdQVGpCMlz5Af9I1U28xDSkP4I aPf2bGXemE2MuOCwnRJpZf3uwW6Rc6iK7sMQdmFN/ixPFsriwa9EIQrDUSY5nbyHDs/2 e08u0h9LepjKw2ASGb6qrgRb/oN4csVXmpfAhpIG9veMVTs1JFEsK4Vf4MA/atcd1XGE nC5w== X-Gm-Message-State: AOAM531evAoXV8DCBZvfiZYCNAUJ6UzcPGx7WsY0/RgsfEP8dBYXVjLi fDh5BtOFReW+rNtC3bP+H3Xql8S3OQiq+G5hGZg= X-Google-Smtp-Source: ABdhPJzDEReoigex6a4HLfSDgIVgRnpl3EOWZRIl03PPy/iOhxq5//mha54HuZjGAVhewyhFSc2qgmqhQ3TJldXsfj4= X-Received: by 2002:a4a:e702:: with SMTP id y2mr10011682oou.44.1589903602436; Tue, 19 May 2020 08:53:22 -0700 (PDT) In-Reply-To: <87f0bfdd-668e-a5f9-6825-818d93a8a03d@gmail.com> Received-SPF: pass client-ip=2607:f8b0:4864:20::c2f; envelope-from=pipcet@gmail.com; helo=mail-oo1-xc2f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, DKIMWL_BL=0.001, 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_PASS=-0.001 autolearn=_AUTOLEARN 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:250959 Archived-At: --00000000000074a2e205a60247f3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2020 at 3:30 PM Cl=C3=A9ment Pit-Claudel wrote: > > So Harfbuzz provides a non-core API which, after a separate call for > > each cluster, allows us to split up a glyph into non-overlapping > > bounding boxes of the same height (the information returned is > > one-dimensional, and intended for carets, not for Emacs-style box > > cursors). > > Are you worried about the height of the box? For the width part, isn't it= just the difference between two consecutive carets? That's what I'd work with, yeah. Perhaps I can make things a little clearer by attaching a screenshot of how things currently look with the "Linux Libertine Display O" font, which has especially prominent ligatures and overhangs (I guess it's somehow inspired by the operating system kernel it's named for?). I think there's plenty to be improved about that: use a ligature, sure, but also maybe get away from the "invert a box" style of drawing the cursor, or handle overhangs specially, or...something. But that would require an idea of which pixels belong to which (sub)glyphs (in the ligature). And caret positioning doesn't give us enough information to do that. Thank you again for pointing out that API! Whether it's a core feature of a shaper or a backend-dependent extra feature is a secondary concern, the important part is that it's there and we can do the right thing. --00000000000074a2e205a60247f3 Content-Type: image/jpeg; name="ffi.jpg" Content-Disposition: attachment; filename="ffi.jpg" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kae3c60y0 /9j/4AAQSkZJRgABAQEBGgEbAAD/4gKwSUNDX1BST0ZJTEUAAQEAAAKgbGNtcwQwAABtbnRyUkdC IFhZWiAH5AAFABIAEwALAA5hY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAA AADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1k ZXNjAAABIAAAAEBjcHJ0AAABYAAAADZ3dHB0AAABmAAAABRjaGFkAAABrAAAACxyWFlaAAAB2AAA ABRiWFlaAAAB7AAAABRnWFlaAAACAAAAABRyVFJDAAACFAAAACBnVFJDAAACFAAAACBiVFJDAAAC FAAAACBjaHJtAAACNAAAACRkbW5kAAACWAAAACRkbWRkAAACfAAAACRtbHVjAAAAAAAAAAEAAAAM ZW5VUwAAACQAAAAcAEcASQBNAFAAIABiAHUAaQBsAHQALQBpAG4AIABzAFIARwBCbWx1YwAAAAAA AAABAAAADGVuVVMAAAAaAAAAHABQAHUAYgBsAGkAYwAgAEQAbwBtAGEAaQBuAABYWVogAAAAAAAA 9tYAAQAAAADTLXNmMzIAAAAAAAEMQgAABd7///MlAAAHkwAA/ZD///uh///9ogAAA9wAAMBuWFla IAAAAAAAAG+gAAA49QAAA5BYWVogAAAAAAAAJJ8AAA+EAAC2xFhZWiAAAAAAAABilwAAt4cAABjZ cGFyYQAAAAAAAwAAAAJmZgAA8qcAAA1ZAAAT0AAACltjaHJtAAAAAAADAAAAAKPXAABUfAAATM0A AJmaAAAmZwAAD1xtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAEcASQBNAFBtbHVjAAAAAAAA AAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEL/2wBDAFA3PEY8MlBGQUZaVVBfeMiCeG5uePWvuZHI ////////////////////////////////////////////////////2wBDAVVaWnhpeOuCguv///// ////////////////////////////////////////////////////////////////////wgARCABh AEQDAREAAhEBAxEB/8QAGAABAQEBAQAAAAAAAAAAAAAAAAMCAQT/xAAUAQEAAAAAAAAAAAAAAAAA AAAA/9oADAMBAAIQAxAAAAGwAAAABMmD0AAAiQB7QACR0mcNFDYMmDgIHtOHQTMg0RLnCgMHDIIH rJlgYOGQQPWTLAmcOAkegwWABEgD2gAAkRB6wAAAAAAAAAAf/8QAIhAAAQMDBAMBAAAAAAAAAAAA AQACEQMQMRIgMDIhIjNA/9oACAEBAAEFAuNxhaytZ31OAeygBNErV5BIDTN3dWYqIdNrphsw5CNH hOJCaZu7qzFRD5o4p3d1Zioh80cU7ukpshPUiCnSmgjbU4XqCoP5/wD/xAAUEQEAAAAAAAAAAAAA AAAAAABg/9oACAEDAQE/AWv/xAAUEQEAAAAAAAAAAAAAAAAAAABg/9oACAECAQE/AWv/xAAeEAAB BAIDAQAAAAAAAAAAAAABABARMSAwIUBhQf/aAAgBAQAGPwLqDR43mgaOIQlvuYc5BzhCp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