emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emojis and other multi-character glyphs


From: Stefan Monnier
Subject: Re: emojis and other multi-character glyphs
Date: Sun, 26 Dec 2021 13:00:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> > 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.  In
> my case, I use a service that has limitation on number chars it can act on
> and emojis are counted as single char.  Anyway, having something like
> `emoji' text-property (as analogue to `composition' text property for
> composed chars) will be very useful for different use-cases

I suspect that whichever way we may define "glyph" it's unlikely to be
100% the same as what your service uses to enforce its limit.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]