This depends on the fonts you are using. And I don't think Elisp has pixel level alignment capability.
Org calculate width of string with string-width
instead of length
. string-width
returns 1 for ASCII and Half width CJK chars or 2 for Full width chars. Evaluate the following code will show you that:
(string-width "m")
1
(string-width "ハ")
1
(string-width "は")
2
Now, even though Org mode got the right answer from the sting property, and added pads around strings, it is the Emacs display engine's job to place where those bits go on the screen.
Emacs display engine gets font information from the underlying OS. To make the complex problem simple, let's say that, with your configuration, m
's width is 5 pixels and "は" is 10. In this case they will be perfectly aligned because Org mode's assumption ("は" takes twice the width of "m") matches with the actual pixels on your screen.
Instead, if your fonts configuration has 7 pixel for "m" and 10 pixel for "は", the things won't match up. And there is nothing Org mode nor the Display engine can do. They did what they told, by your configuration, to do.
C-c C-c
while you are in a cell? I just pasted your example into an org-mode buffer, hitC-c C-c
, and everything aligned nicely.:align-to
display property, described in gnu.org/software/emacs/manual/html_node/elisp/….