all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
       [not found] ` <20220630084754.DED31C016A1@vcs2.savannah.gnu.org>
@ 2022-06-30  9:18   ` Lars Ingebrigtsen
  2022-06-30 14:59     ` [External] : " Drew Adams
  2022-06-30 16:10     ` Juri Linkov
  0 siblings, 2 replies; 25+ messages in thread
From: Lars Ingebrigtsen @ 2022-06-30  9:18 UTC (permalink / raw)
  To: emacs-devel; +Cc: Juri Linkov

Lars Ingebrigtsen <larsi@gnus.org> writes:

>     * lisp/international/emoji.el (emoji-zoom-map)
>     (emoji-zoom-increase, emoji-zoom-decrease): New commands.

These commands should probably be "self repeating" (i.e., repeating
without having to switch on repeat-mode).  But do we have code somewhere
to reuse the repeat-mode machinery in a convenient way?  I poked around,
but didn't see anything obvious.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 25+ messages in thread

* RE: [External] : Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-06-30  9:18   ` master 371c4f642a 1/2: Add new commands to zoom emojis Lars Ingebrigtsen
@ 2022-06-30 14:59     ` Drew Adams
  2022-06-30 16:10     ` Juri Linkov
  1 sibling, 0 replies; 25+ messages in thread
From: Drew Adams @ 2022-06-30 14:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen, emacs-devel@gnu.org; +Cc: Juri Linkov

> These commands should probably be "self repeating" (i.e.,
> repeating without having to switch on repeat-mode).
>
> But do we have code somewhere to reuse the
> repeat-mode machinery in a convenient way?
> I poked around, but didn't see anything obvious.

(Caveat: I'm not following this thread.)

I don't use Emacs 28, with `repeat-mode'.  But surely
that should let you use its "machinery" conveniently,
no?  Wasn't that the idea behind adding it?

Anyway, this alternative is straightforward and works
fine, as a way to get a "self-repeating" command from
one that isn't.

(defun repeat-command (command)
  "Repeat COMMAND."
  (require 'repeat) ; Define its vars before we let-bind them.
  (let ((repeat-previous-repeated-command  command)
        (repeat-message-function           #'ignore)
        (last-repeatable-command           'repeat))
    (repeat nil)))

(defun next-buffer-repeat ()
  "Switch to the next buffer in the selected window.
You can repeat this by hitting the last key again..."
  (interactive)
  (require 'repeat)
  (repeat-command 'next-buffer))

(defun enlarge-window-repeat ()
  "Enlarge selected window vertically by one line.
You can repeat this by hitting the last key again..."
  (interactive)
  (require 'repeat)
  (repeat-command 'enlarge-window))

(defun isearch-yank-line-repeat ()
  "Yank buffer text till end of line onto search string.
You can repeat this by hitting the last key again..."
  (interactive)
  (repeat-command 'isearch-yank-line))

...


(You can also use `transient', but that's kinda
overkill for such simple behavior.)



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-06-30  9:18   ` master 371c4f642a 1/2: Add new commands to zoom emojis Lars Ingebrigtsen
  2022-06-30 14:59     ` [External] : " Drew Adams
@ 2022-06-30 16:10     ` Juri Linkov
  2022-07-01  9:15       ` Lars Ingebrigtsen
  1 sibling, 1 reply; 25+ messages in thread
From: Juri Linkov @ 2022-06-30 16:10 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

>>     * lisp/international/emoji.el (emoji-zoom-map)
>>     (emoji-zoom-increase, emoji-zoom-decrease): New commands.
>
> These commands should probably be "self repeating" (i.e., repeating
> without having to switch on repeat-mode).  But do we have code somewhere
> to reuse the repeat-mode machinery in a convenient way?  I poked around,
> but didn't see anything obvious.

repeat-mode is just a convenience to make it easier to put
a repeatable keymap on a command symbol, then post-command-hook
can activate set-transient-map.  So you could simply use
set-transient-map like e.g. indent-rigidly and text-scale-adjust
are doing.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-06-30 16:10     ` Juri Linkov
@ 2022-07-01  9:15       ` Lars Ingebrigtsen
  2022-07-01 15:36         ` Juri Linkov
  2022-07-04 16:57         ` Arash Esbati
  0 siblings, 2 replies; 25+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-01  9:15 UTC (permalink / raw)
  To: Juri Linkov; +Cc: emacs-devel

Juri Linkov <juri@linkov.net> writes:

> So you could simply use set-transient-map like e.g. indent-rigidly and
> text-scale-adjust are doing.

Ah, thanks.  That was just about as easy to use as I'd hoped.  😀

Perhaps `set-transient-map' should also have an optional MESSAGE thing
that constructs the message?  That is, pass in a MESSAGE of "Indent
region with" and it then constructs the rest via the keymap parameter?
(I think typically these maps don't have keys you wouldn't mention in
these messages...)

	 (substitute-command-keys
	  "Indent region with \\<indent-rigidly-map>\\[indent-rigidly-left], \\[indent-rigidly-right], \\[indent-rigidly-left-to-tab-stop], or \\[indent-rigidly-right-to-tab-stop]."))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-01  9:15       ` Lars Ingebrigtsen
@ 2022-07-01 15:36         ` Juri Linkov
  2022-07-04 16:57         ` Arash Esbati
  1 sibling, 0 replies; 25+ messages in thread
From: Juri Linkov @ 2022-07-01 15:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> Perhaps `set-transient-map' should also have an optional MESSAGE thing
> that constructs the message?  That is, pass in a MESSAGE of "Indent
> region with" and it then constructs the rest via the keymap parameter?
> (I think typically these maps don't have keys you wouldn't mention in
> these messages...)
>
> 	 (substitute-command-keys
> 	  "Indent region with \\<indent-rigidly-map>\\[indent-rigidly-left], \\[indent-rigidly-right], \\[indent-rigidly-left-to-tab-stop], or \\[indent-rigidly-right-to-tab-stop]."))

Since a new optional arg TIMEOUT will be added in bug#21634 anyway,
then MESSAGE could be added as well.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-01  9:15       ` Lars Ingebrigtsen
  2022-07-01 15:36         ` Juri Linkov
@ 2022-07-04 16:57         ` Arash Esbati
  2022-07-04 17:03           ` Eli Zaretskii
  1 sibling, 1 reply; 25+ messages in thread
From: Arash Esbati @ 2022-07-04 16:57 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Juri Linkov, emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Juri Linkov <juri@linkov.net> writes:
>
>> So you could simply use set-transient-map like e.g. indent-rigidly and
>> text-scale-adjust are doing.
>
> Ah, thanks.  That was just about as easy to use as I'd hoped.  😀

Sorry for chiming in, but is `emoji-zoom-increase' supposed to work on
Windows as well?  Putting the cursor on the GRINNING FACE above and
hitting

  C-x 8 e + + + +

doesn't change anything for me.  This is with cfc754a67c on Win10.

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-04 16:57         ` Arash Esbati
@ 2022-07-04 17:03           ` Eli Zaretskii
  2022-07-04 17:23             ` Arash Esbati
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-04 17:03 UTC (permalink / raw)
  To: Arash Esbati; +Cc: larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: Juri Linkov <juri@linkov.net>,  emacs-devel@gnu.org
> Date: Mon, 04 Jul 2022 18:57:26 +0200
> 
> Sorry for chiming in, but is `emoji-zoom-increase' supposed to work on
> Windows as well?  Putting the cursor on the GRINNING FACE above and
> hitting
> 
>   C-x 8 e + + + +
> 
> doesn't change anything for me.  This is with cfc754a67c on Win10.

Works for me here.  Which font are you using for the "character at
point"?



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-04 17:03           ` Eli Zaretskii
@ 2022-07-04 17:23             ` Arash Esbati
  2022-07-04 17:40               ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Arash Esbati @ 2022-07-04 17:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, juri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Works for me here.  Which font are you using for the "character at
> point"?

            character: 😀 (displayed as 😀) (codepoint 128512, #o373000, #x1f600)
              charset: unicode (Unicode (ISO10646))
code point in charset: 0x1F600
               script: emoji
               syntax: w 	which means: word
             category: .:Base
             to input: type "C-x 8 RET 1f600" or "C-x 8 RET GRINNING FACE"
          buffer code: #xF0 #x9F #x98 #x80
            file code: #xF0 #x9F #x98 #x80 (encoded by coding system utf-8-unix)
              display: by this font (glyph code):
    harfbuzz:-outline-Segoe UI Emoji-regular-normal-normal-sans-12-*-*-*-p-*-iso10646-1 (#x2DA0)

Character code properties: customize what to show
  name: GRINNING FACE
  general-category: So (Symbol, Other)
  decomposition: (128512) ('😀')

My config in .emacs is:

(set-fontset-font t 'emoji
                  (font-spec :family   "Segoe UI Emoji"
                             :registry "iso10646-1"
                             :size     9.3)
                  nil 'prepend)

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-04 17:23             ` Arash Esbati
@ 2022-07-04 17:40               ` Eli Zaretskii
  2022-07-04 18:06                 ` Arash Esbati
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-04 17:40 UTC (permalink / raw)
  To: Arash Esbati; +Cc: larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
> Date: Mon, 04 Jul 2022 19:23:29 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Works for me here.  Which font are you using for the "character at
> > point"?
> 
>             character: 😀 (displayed as 😀) (codepoint 128512, #o373000, #x1f600)
>               charset: unicode (Unicode (ISO10646))
> code point in charset: 0x1F600
>                script: emoji
>                syntax: w 	which means: word
>              category: .:Base
>              to input: type "C-x 8 RET 1f600" or "C-x 8 RET GRINNING FACE"
>           buffer code: #xF0 #x9F #x98 #x80
>             file code: #xF0 #x9F #x98 #x80 (encoded by coding system utf-8-unix)
>               display: by this font (glyph code):
>     harfbuzz:-outline-Segoe UI Emoji-regular-normal-normal-sans-12-*-*-*-p-*-iso10646-1 (#x2DA0)
> 
> Character code properties: customize what to show
>   name: GRINNING FACE
>   general-category: So (Symbol, Other)
>   decomposition: (128512) ('😀')
> 
> My config in .emacs is:
> 
> (set-fontset-font t 'emoji
>                   (font-spec :family   "Segoe UI Emoji"
>                              :registry "iso10646-1"
>                              :size     9.3)
>                   nil 'prepend)

And if you remove that :size attribute, what happens?



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-04 17:40               ` Eli Zaretskii
@ 2022-07-04 18:06                 ` Arash Esbati
  2022-07-04 18:14                   ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Arash Esbati @ 2022-07-04 18:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, juri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arash Esbati <arash@gnu.org>
>> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
>> Date: Mon, 04 Jul 2022 19:23:29 +0200
>> 
>> My config in .emacs is:
>> 
>> (set-fontset-font t 'emoji
>>                   (font-spec :family   "Segoe UI Emoji"
>>                              :registry "iso10646-1"
>>                              :size     9.3)
>>                   nil 'prepend)
>
> And if you remove that :size attribute, what happens?

Thanks, that did the trick.  Is this the intended behavior of this
command?

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-04 18:06                 ` Arash Esbati
@ 2022-07-04 18:14                   ` Eli Zaretskii
  2022-07-05  7:15                     ` Arash Esbati
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-04 18:14 UTC (permalink / raw)
  To: Arash Esbati; +Cc: larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
> Date: Mon, 04 Jul 2022 20:06:33 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Arash Esbati <arash@gnu.org>
> >> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
> >> Date: Mon, 04 Jul 2022 19:23:29 +0200
> >> 
> >> My config in .emacs is:
> >> 
> >> (set-fontset-font t 'emoji
> >>                   (font-spec :family   "Segoe UI Emoji"
> >>                              :registry "iso10646-1"
> >>                              :size     9.3)
> >>                   nil 'prepend)
> >
> > And if you remove that :size attribute, what happens?
> 
> Thanks, that did the trick.  Is this the intended behavior of this
> command?

Which command?

What your fontset customization did was force Emacs to always use a
font of a fixed size for these characters.  I wonder why you did that:
it's a strange thing to do.  Did you really want to have Emoji
displayed at size different from the other characters?



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-04 18:14                   ` Eli Zaretskii
@ 2022-07-05  7:15                     ` Arash Esbati
  2022-07-05 11:00                       ` Eli Zaretskii
                                         ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Arash Esbati @ 2022-07-05  7:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, juri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arash Esbati <arash@gnu.org>
>> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
>> Date: Mon, 04 Jul 2022 20:06:33 +0200
>> 
>> Thanks, that did the trick.  Is this the intended behavior of this
>> command?
>
> Which command?

I meant `emoji-zoom-increase' and I was looking for what you wrote
below.

> What your fontset customization did was force Emacs to always use a
> font of a fixed size for these characters.

Thanks, I didn't know that.

> I wonder why you did that: it's a strange thing to do.  Did you really
> want to have Emoji displayed at size different from the other
> characters?

Yes, it was intentional.  I have this in my .emacs:

(custom-set-faces
 '(default ((t (:family "Source Code Pro Medium"
                :foundry "outline"
                :slant normal
                :weight medium
                :height 90
                :width normal)))))

I reduced the size of Emojis in order to harmonize the line height
between the lines with and without Emojis.  I wasn't aware that :size
means "fixed size".

Is there another way to tell Emacs "Use a reduced size for Emojis, but
be flexible when requested otherwise?"  So basically behave like the
definition above for `default'?

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05  7:15                     ` Arash Esbati
@ 2022-07-05 11:00                       ` Eli Zaretskii
  2022-07-05 12:40                         ` Arash Esbati
  2022-07-05 11:18                       ` Lars Ingebrigtsen
  2022-07-05 12:55                       ` Visuwesh
  2 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-05 11:00 UTC (permalink / raw)
  To: Arash Esbati; +Cc: larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
> Date: Tue, 05 Jul 2022 09:15:59 +0200
> 
> Is there another way to tell Emacs "Use a reduced size for Emojis, but
> be flexible when requested otherwise?"  So basically behave like the
> definition above for `default'?

Not that I know of, no.  Basically, the only reliable way of affecting
how Emacs displays non-ASCII characters is via fontsets, and those
doesn't allow relative sizes.  A missing feature, I guess.  All the
face-attributes stuff we have only affects how ASCII characters are
displayed.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05  7:15                     ` Arash Esbati
  2022-07-05 11:00                       ` Eli Zaretskii
@ 2022-07-05 11:18                       ` Lars Ingebrigtsen
  2022-07-05 11:35                         ` Eli Zaretskii
  2022-07-05 12:55                       ` Visuwesh
  2 siblings, 1 reply; 25+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-05 11:18 UTC (permalink / raw)
  To: Arash Esbati; +Cc: Eli Zaretskii, juri, emacs-devel

Arash Esbati <arash@gnu.org> writes:

> I reduced the size of Emojis in order to harmonize the line height
> between the lines with and without Emojis.  I wasn't aware that :size
> means "fixed size".

I think if you use a relative size (i.e. a :height of 0.9 or whatever),
then the resizing should possibly work -- but I haven't actually tested.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05 11:18                       ` Lars Ingebrigtsen
@ 2022-07-05 11:35                         ` Eli Zaretskii
  2022-07-05 12:34                           ` Arash Esbati
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-05 11:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: arash, juri, emacs-devel

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  juri@linkov.net,  emacs-devel@gnu.org
> Date: Tue, 05 Jul 2022 13:18:47 +0200
> 
> Arash Esbati <arash@gnu.org> writes:
> 
> > I reduced the size of Emojis in order to harmonize the line height
> > between the lines with and without Emojis.  I wasn't aware that :size
> > means "fixed size".
> 
> I think if you use a relative size (i.e. a :height of 0.9 or whatever),
> then the resizing should possibly work -- but I haven't actually tested.

Not in font-spec: there a float means something else.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05 11:35                         ` Eli Zaretskii
@ 2022-07-05 12:34                           ` Arash Esbati
  2022-07-05 12:58                             ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Arash Esbati @ 2022-07-05 12:34 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, juri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  juri@linkov.net,  emacs-devel@gnu.org
>> Date: Tue, 05 Jul 2022 13:18:47 +0200
>> 
>> I think if you use a relative size (i.e. a :height of 0.9 or whatever),
>> then the resizing should possibly work -- but I haven't actually tested.
>
> Not in font-spec: there a float means something else.

Besides that, is :height a valid attribute in `font-spec'?  I don't see
it in the docstring and it seems to be ignored when set.

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05 11:00                       ` Eli Zaretskii
@ 2022-07-05 12:40                         ` Arash Esbati
  0 siblings, 0 replies; 25+ messages in thread
From: Arash Esbati @ 2022-07-05 12:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: larsi, juri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arash Esbati <arash@gnu.org>
>> Cc: larsi@gnus.org,  juri@linkov.net,  emacs-devel@gnu.org
>> Date: Tue, 05 Jul 2022 09:15:59 +0200
>> 
>> Is there another way to tell Emacs "Use a reduced size for Emojis, but
>> be flexible when requested otherwise?"  So basically behave like the
>> definition above for `default'?
>
> Not that I know of, no.  Basically, the only reliable way of affecting
> how Emacs displays non-ASCII characters is via fontsets, and those
> doesn't allow relative sizes.  A missing feature, I guess.  All the
> face-attributes stuff we have only affects how ASCII characters are
> displayed.

Thanks for the clarification.  I agree, sounds like a missing feature.
It would be nice to keep the line height constant when using different
fonts for Emojis or Symbola etc.

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05  7:15                     ` Arash Esbati
  2022-07-05 11:00                       ` Eli Zaretskii
  2022-07-05 11:18                       ` Lars Ingebrigtsen
@ 2022-07-05 12:55                       ` Visuwesh
  2022-07-05 18:23                         ` Arash Esbati
  2 siblings, 1 reply; 25+ messages in thread
From: Visuwesh @ 2022-07-05 12:55 UTC (permalink / raw)
  To: Arash Esbati; +Cc: Eli Zaretskii, larsi, juri, emacs-devel

[செவ்வாய் ஜூலை 05, 2022] Arash Esbati wrote:

>> I wonder why you did that: it's a strange thing to do.  Did you really
>> want to have Emoji displayed at size different from the other
>> characters?
>
> Yes, it was intentional.  I have this in my .emacs:
>
> (custom-set-faces
>  '(default ((t (:family "Source Code Pro Medium"
>                 :foundry "outline"
>                 :slant normal
>                 :weight medium
>                 :height 90
>                 :width normal)))))
>
> I reduced the size of Emojis in order to harmonize the line height
> between the lines with and without Emojis.  I wasn't aware that :size
> means "fixed size".
>
> Is there another way to tell Emacs "Use a reduced size for Emojis, but
> be flexible when requested otherwise?"  So basically behave like the
> definition above for `default'?
>

Maybe `face-font-rescale-alist'?

> Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05 12:34                           ` Arash Esbati
@ 2022-07-05 12:58                             ` Eli Zaretskii
  0 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-05 12:58 UTC (permalink / raw)
  To: Arash Esbati; +Cc: larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>,  juri@linkov.net,  emacs-devel@gnu.org
> Date: Tue, 05 Jul 2022 14:34:34 +0200
> 
> >> I think if you use a relative size (i.e. a :height of 0.9 or whatever),
> >> then the resizing should possibly work -- but I haven't actually tested.
> >
> > Not in font-spec: there a float means something else.
> 
> Besides that, is :height a valid attribute in `font-spec'?  I don't see
> it in the docstring and it seems to be ignored when set.

No.  I meant :size.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05 12:55                       ` Visuwesh
@ 2022-07-05 18:23                         ` Arash Esbati
  2022-07-07  9:42                           ` Arash Esbati
  0 siblings, 1 reply; 25+ messages in thread
From: Arash Esbati @ 2022-07-05 18:23 UTC (permalink / raw)
  To: Visuwesh; +Cc: Eli Zaretskii, larsi, juri, emacs-devel

Visuwesh <visuweshm@gmail.com> writes:

>> Is there another way to tell Emacs "Use a reduced size for Emojis, but
>> be flexible when requested otherwise?"  So basically behave like the
>> definition above for `default'?
>
> Maybe `face-font-rescale-alist'?

Thanks, that works.  Now I have this in my .emacs and 'C-x 8 e +' works
as expected:

    (set-fontset-font t 'emoji
                      (font-spec :family   "Segoe UI Emoji"
                                 :registry "iso10646-1")
                      nil 'prepend)

    (add-to-list 'face-font-rescale-alist
                 '("Segoe UI Emoji" . 0.93)
                 t)

Thanks for the hint.

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-05 18:23                         ` Arash Esbati
@ 2022-07-07  9:42                           ` Arash Esbati
  2022-07-07 10:50                             ` Eli Zaretskii
  2022-07-10  8:35                             ` Eli Zaretskii
  0 siblings, 2 replies; 25+ messages in thread
From: Arash Esbati @ 2022-07-07  9:42 UTC (permalink / raw)
  To: Visuwesh; +Cc: Eli Zaretskii, larsi, juri, emacs-devel

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

Arash Esbati <arash@gnu.org> writes:

> Thanks, that works.  Now I have this in my .emacs and 'C-x 8 e +' works
> as expected:
>
>     (set-fontset-font t 'emoji
>                       (font-spec :family   "Segoe UI Emoji"
>                                  :registry "iso10646-1")
>                       nil 'prepend)
>
>     (add-to-list 'face-font-rescale-alist
>                  '("Segoe UI Emoji" . 0.93)
>                  t)

Following up myself, I'm facing a strange behavior with the code above
in combination with:

    (setq inhibit-splash-screen t)

I started Emacs with a minimal .emacs like this:

--8<---------------cut here---------------start------------->8---
;;;                                 -*- lexical-binding: t; -*-

(set-fontset-font t 'emoji
                  (font-spec :family   "Segoe UI Emoji"
                             :registry "iso10646-1")
                  nil 'prepend)

(add-to-list 'face-font-rescale-alist
             '("Segoe UI Emoji" . 0.93))

(setq inhibit-splash-screen t)

(custom-set-faces
 '(default ((t (:family "Source Code Pro Medium" :foundry "outline" :slant normal :weight medium :height 90 :width normal)))))
--8<---------------cut here---------------end--------------->8---

Then I hit 'C-x 5 2' and the new frame is opened with Arial and not with
Source Code Pro like this:

[-- Attachment #2: x.png --]
[-- Type: image/png, Size: 82469 bytes --]

[-- Attachment #3: Type: text/plain, Size: 170 bytes --]


If I comment out either the face-font-rescale-alist or the
inhibit-splash-screen part, the new frame pops up with Source Code Pro.

Am I missing something?

Best, Arash

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-07  9:42                           ` Arash Esbati
@ 2022-07-07 10:50                             ` Eli Zaretskii
  2022-07-10  8:35                             ` Eli Zaretskii
  1 sibling, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-07 10:50 UTC (permalink / raw)
  To: Arash Esbati; +Cc: visuweshm, larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  larsi@gnus.org,  juri@linkov.net,
>   emacs-devel@gnu.org
> Date: Thu, 07 Jul 2022 11:42:25 +0200
> 
> I started Emacs with a minimal .emacs like this:
> 
> --8<---------------cut here---------------start------------->8---
> ;;;                                 -*- lexical-binding: t; -*-
> 
> (set-fontset-font t 'emoji
>                   (font-spec :family   "Segoe UI Emoji"
>                              :registry "iso10646-1")
>                   nil 'prepend)
> 
> (add-to-list 'face-font-rescale-alist
>              '("Segoe UI Emoji" . 0.93))
> 
> (setq inhibit-splash-screen t)
> 
> (custom-set-faces
>  '(default ((t (:family "Source Code Pro Medium" :foundry "outline" :slant normal :weight medium :height 90 :width normal)))))
> --8<---------------cut here---------------end--------------->8---
> 
> Then I hit 'C-x 5 2' and the new frame is opened with Arial and not with
> Source Code Pro like this:
> 
> 
> If I comment out either the face-font-rescale-alist or the
> inhibit-splash-screen part, the new frame pops up with Source Code Pro.
> 
> Am I missing something?

Sounds like another issue with :family on Windows -- it isn't
reliable, especially when the likes of "Medium" are mentioned in the
family name.  ISTR this caused you trouble in the past, right?

But that's a guess: I don't have Segoe UI Emoji here, so I cannot
debug this strange problem, sorry.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-07  9:42                           ` Arash Esbati
  2022-07-07 10:50                             ` Eli Zaretskii
@ 2022-07-10  8:35                             ` Eli Zaretskii
  2022-07-10 17:01                               ` Arash Esbati
  1 sibling, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-10  8:35 UTC (permalink / raw)
  To: Arash Esbati; +Cc: visuweshm, larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  larsi@gnus.org,  juri@linkov.net,
>   emacs-devel@gnu.org
> Date: Thu, 07 Jul 2022 11:42:25 +0200
> 
> Following up myself, I'm facing a strange behavior with the code above
> in combination with:
> 
>     (setq inhibit-splash-screen t)
> 
> I started Emacs with a minimal .emacs like this:
> 
> --8<---------------cut here---------------start------------->8---
> ;;;                                 -*- lexical-binding: t; -*-
> 
> (set-fontset-font t 'emoji
>                   (font-spec :family   "Segoe UI Emoji"
>                              :registry "iso10646-1")
>                   nil 'prepend)
> 
> (add-to-list 'face-font-rescale-alist
>              '("Segoe UI Emoji" . 0.93))
> 
> (setq inhibit-splash-screen t)
> 
> (custom-set-faces
>  '(default ((t (:family "Source Code Pro Medium" :foundry "outline" :slant normal :weight medium :height 90 :width normal)))))
> --8<---------------cut here---------------end--------------->8---
> 
> Then I hit 'C-x 5 2' and the new frame is opened with Arial and not with
> Source Code Pro like this:
> 
> If I comment out either the face-font-rescale-alist or the
> inhibit-splash-screen part, the new frame pops up with Source Code Pro.

I hope I fixed this now on master.



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-10  8:35                             ` Eli Zaretskii
@ 2022-07-10 17:01                               ` Arash Esbati
  2022-07-10 17:09                                 ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Arash Esbati @ 2022-07-10 17:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: visuweshm, larsi, juri, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> I hope I fixed this now on master.

Yes, it is fixed.  Many thanks for taking care of this.

Best, Arash



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: master 371c4f642a 1/2: Add new commands to zoom emojis
  2022-07-10 17:01                               ` Arash Esbati
@ 2022-07-10 17:09                                 ` Eli Zaretskii
  0 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2022-07-10 17:09 UTC (permalink / raw)
  To: Arash Esbati; +Cc: visuweshm, larsi, juri, emacs-devel

> From: Arash Esbati <arash@gnu.org>
> Cc: visuweshm@gmail.com,  larsi@gnus.org,  juri@linkov.net,
>   emacs-devel@gnu.org
> Date: Sun, 10 Jul 2022 19:01:48 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > I hope I fixed this now on master.
> 
> Yes, it is fixed.  Many thanks for taking care of this.

Thanks for testing the fix.



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2022-07-10 17:09 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <165657886980.22137.11785189028438514501@vcs2.savannah.gnu.org>
     [not found] ` <20220630084754.DED31C016A1@vcs2.savannah.gnu.org>
2022-06-30  9:18   ` master 371c4f642a 1/2: Add new commands to zoom emojis Lars Ingebrigtsen
2022-06-30 14:59     ` [External] : " Drew Adams
2022-06-30 16:10     ` Juri Linkov
2022-07-01  9:15       ` Lars Ingebrigtsen
2022-07-01 15:36         ` Juri Linkov
2022-07-04 16:57         ` Arash Esbati
2022-07-04 17:03           ` Eli Zaretskii
2022-07-04 17:23             ` Arash Esbati
2022-07-04 17:40               ` Eli Zaretskii
2022-07-04 18:06                 ` Arash Esbati
2022-07-04 18:14                   ` Eli Zaretskii
2022-07-05  7:15                     ` Arash Esbati
2022-07-05 11:00                       ` Eli Zaretskii
2022-07-05 12:40                         ` Arash Esbati
2022-07-05 11:18                       ` Lars Ingebrigtsen
2022-07-05 11:35                         ` Eli Zaretskii
2022-07-05 12:34                           ` Arash Esbati
2022-07-05 12:58                             ` Eli Zaretskii
2022-07-05 12:55                       ` Visuwesh
2022-07-05 18:23                         ` Arash Esbati
2022-07-07  9:42                           ` Arash Esbati
2022-07-07 10:50                             ` Eli Zaretskii
2022-07-10  8:35                             ` Eli Zaretskii
2022-07-10 17:01                               ` Arash Esbati
2022-07-10 17:09                                 ` Eli Zaretskii

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.