all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Evgeny Zajcev <lg.zevlg@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: emojis and other multi-character glyphs
Date: Sun, 26 Dec 2021 13:56:12 +0300	[thread overview]
Message-ID: <CAO=W_Zoano-RGg8EA=TgtLbWnuzoqQAje_i9zkk8vOSv01n61Q@mail.gmail.com> (raw)
In-Reply-To: <83czljprkp.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1013 bytes --]

вс, 26 дек. 2021 г. в 13:51, Eli Zaretskii <eliz@gnu.org>:

> > From: Evgeny Zajcev <lg.zevlg@gmail.com>
> > Date: Sun, 26 Dec 2021 13:41:21 +0300
> > Cc: emacs-devel <emacs-devel@gnu.org>
> >
> >  > And also it will be possible to write something like
> `string-glyph-length' to return 1 for "👨‍👩‍👧‍👦"
> >  instead of 7
> >  > as `length' returns now.
> >
> >  Why would that be useful?
> >
> > Sometimes it is useful to know real string length before acting on
> > it.
>
> If you mean their width on display, then we have string-width for
> that.  And if you need absolute accuracy, use window-text-pixel-size.
>
> > In my case, I use a service that has
> > limitation on number chars it can act on and emojis are counted as
> > single char.
>
> But that is incorrect: most Emoji sequences occupy two columns on display.
>

No, no, not string-width, string length in number of glyphs, as Swift
counts them: "👨‍👩‍👧‍👦".length == 1

-- 
lg

[-- Attachment #2: Type: text/html, Size: 1674 bytes --]

  reply	other threads:[~2021-12-26 10:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26  9:43 emojis and other multi-character glyphs Evgeny Zajcev
2021-12-26 10:15 ` Eli Zaretskii
2021-12-26 10:41   ` Evgeny Zajcev
2021-12-26 10:51     ` Eli Zaretskii
2021-12-26 10:56       ` Evgeny Zajcev [this message]
2021-12-26 10:58         ` Eli Zaretskii
2021-12-26 11:09           ` Evgeny Zajcev
2021-12-26 11:26             ` Eli Zaretskii
2021-12-26 11:53               ` Lars Ingebrigtsen
2021-12-26 11:57                 ` Eli Zaretskii
2021-12-26 12:03                   ` Lars Ingebrigtsen
2021-12-26 12:13                     ` Eli Zaretskii
2021-12-26 12:16                       ` Po Lu
2021-12-26 12:26                       ` Lars Ingebrigtsen
2021-12-26 12:50                         ` Po Lu
2021-12-26 13:00                         ` Eli Zaretskii
2021-12-27 10:30                           ` Lars Ingebrigtsen
2021-12-27 14:46                             ` Eli Zaretskii
2021-12-29  4:54                               ` Anand Tamariya
2021-12-29 13:01                                 ` Eli Zaretskii
2021-12-26 12:35                   ` LdBeth
2021-12-26 13:01                     ` Eli Zaretskii
2021-12-26 18:00     ` Stefan Monnier
2021-12-26 10:45 ` Lars Ingebrigtsen
2021-12-26 10:50   ` Evgeny Zajcev

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='CAO=W_Zoano-RGg8EA=TgtLbWnuzoqQAje_i9zkk8vOSv01n61Q@mail.gmail.com' \
    --to=lg.zevlg@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.