From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: Display certain glyphs with paddings on the side Date: Tue, 3 Dec 2019 13:43:33 -0500 Message-ID: References: <87CA0401-1087-45C1-A952-DB8624C04D32@gmail.com> <83immylmpu.fsf@gnu.org> <83d0d5jom5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="233555"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 03 20:47:35 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1icE8z-000yeF-TU for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 20:47:34 +0100 Original-Received: from localhost ([::1]:57912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icE8v-0002A5-P8 for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 14:47:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48547) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icD9J-00053U-KG for emacs-devel@gnu.org; Tue, 03 Dec 2019 13:43:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icD9B-0002IJ-KB for emacs-devel@gnu.org; Tue, 03 Dec 2019 13:43:45 -0500 Original-Received: from mail-qt1-x82b.google.com ([2607:f8b0:4864:20::82b]:37355) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icD9B-0001si-Es; Tue, 03 Dec 2019 13:43:41 -0500 Original-Received: by mail-qt1-x82b.google.com with SMTP id w47so4848251qtk.4; Tue, 03 Dec 2019 10:43:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Xk8RL7TBbhYeezHd/MXGpQWGS7nfGoazH0cURPHt3d4=; b=DBuNGd7/1uBsnAXv/VwWLVnFupQT6yWOxlYPwxYWtm1zq/+HXGplEvnjxdLGBY6iai 993Kwvojfm9zC+LFhnFeU/4pOi8LM5e2MbAbYjEtafdUxBDfiueu9N5P4oYI4R6q83UG poNlBz+pDMVmlBd70JotrI7bGCfEvf7xnbJV4XvSRyRZLmZXcZNtTrzhA1zq9aLb+FBG dE88xeZcc3qKGOngd2zKWo4iAFzu1iM2tbla60mCeTNX8LAvWMLhbdlA13oucFyyGLRm LOvfcn5fStRHTd0dHvMNjPBDWYB6uIq8m0Du1lN7IHYMHzOIytq6ufzFbI9ZFMXLyDE0 Zh+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Xk8RL7TBbhYeezHd/MXGpQWGS7nfGoazH0cURPHt3d4=; b=DFDSTNX2weTM5hn4jBuSJGzaXv5kiIYJFfXAfafvv4xZyPj4H2THwa56cJdjROMRbP /AsPBwnupwWkGPkwvvLePL6hJsw4wvc02ScUoXI0EOZ7JMkOuvgAehCyeHuDQUUcmdmB tT7kihQ5jPCZyAt7FMFY3FjGqq6zAbko0GpUQCkf+rQ5QJV8Tx5VfcgQv9lGKYO+mOWY 4gf9hOFqh+WCgrLmAstPW4mhJpWw9zk1x/GVq8ihC0zYgk2LKn0l3MSY3lL098kwuiAH OFEj/ZeGP/CRUpV0+6khT3W8VzJhZ1ZA2dNbE1HPXp44+s/kcCnYtb/ePxN819CcVlSd ER7Q== X-Gm-Message-State: APjAAAV9k1l6yewYL2W6m0tNvjdOglM0Gb1Jx9Kx4FNiBung0BpFVx2c q3H69fhfih+i5qnyKCxWK6cJAVNq X-Google-Smtp-Source: APXvYqxByelIRePwygtvZTRJVAo5Dy8Vcru/Aq8PMQoLkAAKmuTIEpFHB1EHjQT5BeKSYQMWJpbKwQ== X-Received: by 2002:aed:3e30:: with SMTP id l45mr6470368qtf.195.1575398614624; Tue, 03 Dec 2019 10:43:34 -0800 (PST) Original-Received: from ?IPv6:2603:400a:0:82c:fff0:4e82:4e43:cc9e? ([2603:400a:0:82c:fff0:4e82:4e43:cc9e]) by smtp.googlemail.com with ESMTPSA id g18sm2173157qki.13.2019.12.03.10.43.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2019 10:43:34 -0800 (PST) In-Reply-To: <83d0d5jom5.fsf@gnu.org> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::82b 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:243085 Archived-At: On 2019-12-03 12:38, Eli Zaretskii wrote: >> From: Clément Pit-Claudel >> Date: Tue, 3 Dec 2019 11:42:03 -0500 >> >> I think Emacs might have most of the features needed already as part of the composition engine > > No, character composition does nothing to the width of glyphs on > display. We take the width from the glyph metrics reported by the > font. For the OP's purpose, I think character composition is "enough", in the sense that it can be used to display a glyphs with padding on the sides (as far as I know, composition can't be used to shrink a glyph, however). Concretely, I'm think of this:   (insert (compose-string "a" 0 1 '(?\s (br . bl) ?\s (bc . bc) ?我))) If I'm reading the spec correctly, this should draw the character 我 with padding on both sides to reach the width of two spaces (assuming the choice of fonts is such as 我 is narrower than two spaces to being with). Clément.