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 11:42:03 -0500 Message-ID: References: <87CA0401-1087-45C1-A952-DB8624C04D32@gmail.com> <83immylmpu.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="57820"; 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 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 03 18:02:23 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 1icBZ8-000Epv-9F for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 18:02:22 +0100 Original-Received: from localhost ([::1]:56170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icBZ5-0004pX-Rp for ged-emacs-devel@m.gmane.org; Tue, 03 Dec 2019 12:02:19 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36137) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icBFo-0004dM-CS for emacs-devel@gnu.org; Tue, 03 Dec 2019 11:42:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icBFi-0001Pi-5Q for emacs-devel@gnu.org; Tue, 03 Dec 2019 11:42:20 -0500 Original-Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]:39556) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icBFc-00018r-Rt for emacs-devel@gnu.org; Tue, 03 Dec 2019 11:42:14 -0500 Original-Received: by mail-qt1-x82e.google.com with SMTP id g1so4405530qtj.6 for ; Tue, 03 Dec 2019 08:42:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=41QeN8Yjl/SuA0UuYh2tHdi+3U3v77NxG34G4ZawnJM=; b=VU+nmqHGFWQrq5QxwzwmI6rK/I5KZpkRDmtRy7ge9MYMesEhbE2E4yjLNLIU3Mm39f 7Q6gfA/7r0d8SgstfqeoLVe/3z7G4JKlEQtZb5ZeajoRR97FcwHzjsb8UQodNzLR28Ed rGBZSsgZWTqorp8fFWRQjqIJH8lztAI8TxdrJ4SaTU+OLdVtB43x/1acdpLTTXniaggn Rwf8n1mb+dtuhpcuuckm4il+MA71wHwwbcuU2Su08zeyWPeQuagZ5Ys2fQRomAQPJisf uOQD+YTh1X560N8qPYmIDskpczyszD/KnUpxKy7W1wEHh5uAK4ClDMK2K+jGWuoQl0v2 R4gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=41QeN8Yjl/SuA0UuYh2tHdi+3U3v77NxG34G4ZawnJM=; b=F7d3ldEHBQFEaems2BL7fMoM6etPkbkFi9DwWGHey0T4rDd/Fa3pFdF2LpIIB6GXAL 6uShHgcMQBoBkZSTzUamvPGbfeU1lfSsqfnfd/JcDXg1kjWi4CR4LDACEHNTE40fziUb IvobEeUhIRZhDYU+iJaJIVMHhsitg7bxgTKOHOE/iHDIrRHIStE1q0OdEiwcFP7k5jn/ KsXZhCj1ZGG6Kdp43pCmP1vQ0pqU+HZPpeEsptmB952apnQPYbfqV7lcPEkDQTTp4hD0 AEpEGSNrf/zQl+1QBACVVYvL/Pcex7ZwGyWkhkOn080UbCHCJIeOkY128ErPtzWU73oV 4l7g== X-Gm-Message-State: APjAAAWjT9tUIRYPDNSYnBQDVO0bhWmXotrKWFLgrPOItW6vrXEvYz6z 8SGStodOqFry0qNRW/S137lA1J5z X-Google-Smtp-Source: APXvYqzza9PxKJXdv9CtqcVM1JD8k99JQA08Mfocf6MsYIXXfMp7zGrZljKJ8lKZgwkmQh/uFCZGcQ== X-Received: by 2002:aed:2fc3:: with SMTP id m61mr5831765qtd.47.1575391325556; Tue, 03 Dec 2019 08:42:05 -0800 (PST) Original-Received: from [128.30.9.205] (30-9-205.wireless.csail.mit.edu. [128.30.9.205]) by smtp.googlemail.com with ESMTPSA id l31sm2038393qte.30.2019.12.03.08.42.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Dec 2019 08:42:05 -0800 (PST) In-Reply-To: <83immylmpu.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::82e 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:243064 Archived-At: On 2019-12-02 11:24, Eli Zaretskii wrote: >> From: Yuan Fu >> Date: Sat, 30 Nov 2019 14:51:29 -0500 >> >> Aligning ACSII characters with Chinese characters in Emacs has been a pain for me. The common solution (among Chinese community) is to scale Chinese characters with `face-font-rescale-alist’ and make one Chinese character precisely twice as wide as a ASCII character. However, that makes the Chinese characters taller than the ASCII characters. Is it possible to add some padding to the sides of a Chinese character and make it twice as wide in Emacs? > > I don't think we have any such features. You will have to choose your > fonts such that they provide this nice alignment. This is the approach that I've been using in a different context. I use programming languages with heavy reliane on mathematical symbols, so I have patched versions of mathematical fonts to ensure that symbols line up nicely with monospace characters. The python code that does these transformations is here: https://github.com/cpitclaudel/monospacifier I think Emacs might have most of the features needed already as part of the composition engine, but applying the right composition properties to each character would be costly and complicated. Clément.