From: Yuan Fu <casouri@gmail.com>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Display certain glyphs with paddings on the side
Date: Tue, 3 Dec 2019 20:22:59 -0500 [thread overview]
Message-ID: <7B97B0DA-7472-4410-B6B6-3C81F587D9EB@gmail.com> (raw)
In-Reply-To: <cbcc7ff7-6af3-c5f9-5249-4ae59933347f@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1359 bytes --]
>
> Ideally, what I'd love to have is a mode that implements a grid-like layout, where each character occupies an exact multiple of the base character width, regardless of which font it comes from.
>
> Deciding what this multiple should be for each character could be done in various ways; for my purposes (and for OP's case as well, I think), it would be enough to use one cell for halfwidth characters, two for fullwidth characters, and add a few exceptions for things like TAB and zero-width spaces (I'm using the terms fullwidth and halfwidth in the sense of https://www.unicode.org/reports/tr11/ <https://www.unicode.org/reports/tr11/>).
>
Clément expressed the idea better than I could have. However, I’d like to see it as a face attribute instead of a mode. (Because I want to align my org table). Maybe there could be a face attribute (:grid WIDTH) that instructs the display engine to pad each glyph to have width that is a multiple of WIDTH in pixel, and if WIDTH is t, default to “base character width”?
I remembered that ‘window-width’ gives width in char widths and had a look at its source. It knows the character width from FRAME_COLUMN_WIDTH; the comment says the value currently equals to the average width of the default font of the frame. I think this value can be used as the “base character width”.
Yuan
[-- Attachment #2: Type: text/html, Size: 5520 bytes --]
next prev parent reply other threads:[~2019-12-04 1:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-30 19:51 Display certain glyphs with paddings on the side Yuan Fu
2019-12-02 16:24 ` Eli Zaretskii
2019-12-03 4:56 ` Richard Stallman
2019-12-03 15:43 ` Eli Zaretskii
2019-12-03 15:49 ` Yuan Fu
2019-12-03 16:42 ` Clément Pit-Claudel
2019-12-03 17:38 ` Eli Zaretskii
2019-12-03 18:36 ` Yuri Khan
2019-12-03 18:42 ` Eli Zaretskii
2019-12-03 18:43 ` Clément Pit-Claudel
2019-12-03 19:13 ` Eli Zaretskii
2019-12-03 20:00 ` Clément Pit-Claudel
2019-12-04 1:22 ` Yuan Fu [this message]
2019-12-04 3:41 ` Eli Zaretskii
2019-12-02 18:34 ` 황병희
2019-12-03 15:51 ` Yuan Fu
2019-12-03 22:33 ` 황병희
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7B97B0DA-7472-4410-B6B6-3C81F587D9EB@gmail.com \
--to=casouri@gmail.com \
--cc=cpitclaudel@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.