all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
       [not found] ` <20220824064044.65239C0088A@vcs2.savannah.gnu.org>
@ 2022-08-24  6:45   ` Po Lu
  2022-08-24  7:06     ` Stefan Kangas
  0 siblings, 1 reply; 19+ messages in thread
From: Po Lu @ 2022-08-24  6:45 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Kangas

Stefan Kangas <stefankangas@gmail.com> writes:

> branch: scratch/icons
> commit 09509f4fa1b1a749c767f760c5bb9e0080e303d2
> Author: Stefan Kangas <stefan@marxist.se>
> Commit: Stefan Kangas <stefankangas@gmail.com>
>
>     Import Material design icons
>     
>     * lisp/icons-material.el:
>     * etc/images/material/**/*.svg: New files.

Are there any license problems with those icons?

Further more, shouldn't we make PBM versions of those icons, in case
librsvg is not available?  And preferably use a variant that has colors,
to make it easier to tell them apart from each other?

Thanks.



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

* Re: scratch/icons 67251e79f7 09/11: Use material icons in mpc toolbar
       [not found] ` <20220824064044.DC0C2C0088A@vcs2.savannah.gnu.org>
@ 2022-08-24  6:46   ` Po Lu
  2022-08-24  7:21     ` Stefan Kangas
  0 siblings, 1 reply; 19+ messages in thread
From: Po Lu @ 2022-08-24  6:46 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Kangas

Stefan Kangas <stefankangas@gmail.com> writes:

>  etc/images/mpc/README     |   6 ------
>  etc/images/mpc/add.pbm    | Bin 81 -> 0 bytes
>  etc/images/mpc/add.xpm    |  31 -------------------------------
>  etc/images/mpc/ffwd.pbm   | Bin 81 -> 0 bytes
>  etc/images/mpc/ffwd.xpm   |  33 ---------------------------------
>  etc/images/mpc/next.pbm   | Bin 81 -> 0 bytes
>  etc/images/mpc/next.xpm   |  33 ---------------------------------
>  etc/images/mpc/pause.pbm  | Bin 81 -> 0 bytes
>  etc/images/mpc/pause.xpm  |  32 --------------------------------
>  etc/images/mpc/play.pbm   | Bin 81 -> 0 bytes
>  etc/images/mpc/play.xpm   |  33 ---------------------------------
>  etc/images/mpc/prev.pbm   | Bin 81 -> 0 bytes
>  etc/images/mpc/prev.xpm   |  32 --------------------------------
>  etc/images/mpc/rewind.pbm | Bin 81 -> 0 bytes
>  etc/images/mpc/rewind.xpm |  32 --------------------------------
>  etc/images/mpc/stop.pbm   | Bin 81 -> 0 bytes
>  etc/images/mpc/stop.xpm   |  32 --------------------------------

I object to removing the existing icons, when no XPM and PBM
replacements are provided.

Especially PBM icons, since it's the only non-SVG format image.c can
manually specify the foreground and background for.



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

* Re: scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar
       [not found] ` <20220824064044.B7530C0088A@vcs2.savannah.gnu.org>
@ 2022-08-24  6:50   ` Po Lu
  2022-08-24  7:20     ` Stefan Kangas
  2022-08-24 12:07     ` Stefan Monnier
  0 siblings, 2 replies; 19+ messages in thread
From: Po Lu @ 2022-08-24  6:50 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Kangas

Stefan Kangas <stefankangas@gmail.com> writes:

>      `(find-image (cond ((not (display-color-p))
> -			',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec))
> +                        ',(list svg-spec pbm-spec xbm-spec xpm-lo-spec xpm-spec))
>  		       ((< (display-color-cells) 256)
> -			',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec))
> +                        ',(list svg-spec xpm-lo-spec xpm-spec pbm-spec xbm-spec))

Non-color displays and displays whose visual class is not TrueColor
cannot display SVG images.  The svg code just doesn't work.

So SVG should only be enabled in the case that (display-visual-class) is
true-color.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24  6:45   ` scratch/icons 09509f4fa1 05/11: Import Material design icons Po Lu
@ 2022-08-24  7:06     ` Stefan Kangas
  2022-08-24 10:40       ` Po Lu
  2022-08-24 12:09       ` Stefan Monnier
  0 siblings, 2 replies; 19+ messages in thread
From: Stefan Kangas @ 2022-08-24  7:06 UTC (permalink / raw)
  To: Po Lu, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

>>     Import Material design icons
>>
>>     * lisp/icons-material.el:
>>     * etc/images/material/**/*.svg: New files.
>
> Are there any license problems with those icons?

Not that I'm aware of, no.  They are licensed under the GPL compatible
Apache License Version 2.0.

See these files on the branch for more:
    etc/images/material/README
    etc/images/material/LICENSE

> Further more, shouldn't we make PBM versions of those icons, in case
> librsvg is not available?

There should be some kind of fallback for when SVG is not available,
yes.  I'm not yet sure exactly what that will look like.  The problem
with generating PBM versions AFAIK is that they don't scale, so maybe
we'd want to prefer Unicode symbols in those cases (or even emojis,
though I'm not exactly a huge fan).

> And preferably use a variant that has colors, to make it easier to
> tell them apart from each other?

We don't need to have any different variants: the svg icons will use
whatever foreground/background the current face has.

Thanks for your feedback.



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

* Re: scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar
  2022-08-24  6:50   ` scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar Po Lu
@ 2022-08-24  7:20     ` Stefan Kangas
  2022-08-24 10:31       ` Po Lu
  2022-08-24 12:07     ` Stefan Monnier
  1 sibling, 1 reply; 19+ messages in thread
From: Stefan Kangas @ 2022-08-24  7:20 UTC (permalink / raw)
  To: Po Lu, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> So SVG should only be enabled in the case that (display-visual-class) is
> true-color.

Thanks, that's good to know.  I'll change this accordingly.



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

* Re: scratch/icons 67251e79f7 09/11: Use material icons in mpc toolbar
  2022-08-24  6:46   ` scratch/icons 67251e79f7 09/11: Use material icons in mpc toolbar Po Lu
@ 2022-08-24  7:21     ` Stefan Kangas
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Kangas @ 2022-08-24  7:21 UTC (permalink / raw)
  To: Po Lu, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> I object to removing the existing icons, when no XPM and PBM
> replacements are provided.

Thanks, I think this is a valid point.

We should consider leaving these images to use as fallbacks, but that
will also depend on what kind of fallbacks we want to provide more
generally.  Please see my other reply for more details on that.



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

* Re: scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar
  2022-08-24  7:20     ` Stefan Kangas
@ 2022-08-24 10:31       ` Po Lu
  0 siblings, 0 replies; 19+ messages in thread
From: Po Lu @ 2022-08-24 10:31 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> Thanks, that's good to know.  I'll change this accordingly.

Thanks.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24  7:06     ` Stefan Kangas
@ 2022-08-24 10:40       ` Po Lu
  2022-08-24 11:28         ` Eli Zaretskii
  2022-08-24 12:09       ` Stefan Monnier
  1 sibling, 1 reply; 19+ messages in thread
From: Po Lu @ 2022-08-24 10:40 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> There should be some kind of fallback for when SVG is not available,
> yes.  I'm not yet sure exactly what that will look like.  The problem
> with generating PBM versions AFAIK is that they don't scale, so maybe
> we'd want to prefer Unicode symbols in those cases (or even emojis,
> though I'm not exactly a huge fan).

We cannot put symbols in the tool bar, AFAIK.  (And what if no such
Unicode font exists, which is the situation under the xfont backend and
Windows 9X for most Unicode Emoji?)

I think relying on the normal, primitive, scaling is fine, should SVG
support not be available.  Modern systems that can display the Unicode
symbols will also be able to run librsvg.

> We don't need to have any different variants: the svg icons will use
> whatever foreground/background the current face has.

No, what I meant was to provide icons that have contrasting colors.
This makes the icons easier to visually identify.  For an example of
this, see how spell.xpm has a green checkmark put up against black text,
which makes it easier to spot in the toolbar than similar icons in an
Android program that uses single-color icons.

Thanks.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 10:40       ` Po Lu
@ 2022-08-24 11:28         ` Eli Zaretskii
  2022-08-24 12:05           ` Po Lu
  0 siblings, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-08-24 11:28 UTC (permalink / raw)
  To: Po Lu; +Cc: stefankangas, emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 24 Aug 2022 18:40:53 +0800
> 
> Stefan Kangas <stefankangas@gmail.com> writes:
> 
> > There should be some kind of fallback for when SVG is not available,
> > yes.  I'm not yet sure exactly what that will look like.  The problem
> > with generating PBM versions AFAIK is that they don't scale, so maybe
> > we'd want to prefer Unicode symbols in those cases (or even emojis,
> > though I'm not exactly a huge fan).
> 
> We cannot put symbols in the tool bar, AFAIK.

If that's the tool bar displayed by Emacs (nit by the toolkit), then
yes, we can.  The Emacs tool bar is just a special kind of window,
which displays a Lisp string instead of text of some buffer.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 11:28         ` Eli Zaretskii
@ 2022-08-24 12:05           ` Po Lu
  2022-08-24 12:11             ` Lars Ingebrigtsen
  2022-08-24 12:21             ` Eli Zaretskii
  0 siblings, 2 replies; 19+ messages in thread
From: Po Lu @ 2022-08-24 12:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: stefankangas, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> If that's the tool bar displayed by Emacs (nit by the toolkit), then
> yes, we can.  The Emacs tool bar is just a special kind of window,
> which displays a Lisp string instead of text of some buffer.

Right, but that text is a label which isn't displayed everywhere, most
notably under NS toolkit tooltips.



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

* Re: scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar
  2022-08-24  6:50   ` scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar Po Lu
  2022-08-24  7:20     ` Stefan Kangas
@ 2022-08-24 12:07     ` Stefan Monnier
  2022-08-24 12:27       ` Po Lu
  1 sibling, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2022-08-24 12:07 UTC (permalink / raw)
  To: Po Lu; +Cc: emacs-devel, Stefan Kangas

> Non-color displays and displays whose visual class is not TrueColor
> cannot display SVG images.  The svg code just doesn't work.

Is that the case for all the SVG renderers?
What does "doesn't work" mean, exactly.  Does it signal an error? draw
something with wrong colors? draw complete random noise? just silently
does nothing?  Is the behavior the same for monochrome displays as for
colormapped displays?

I've used 16bit TrueColor displays until quite recently, but can't
remember using (or hearing someone mention the use of) a colormapped
display in the last ... 20 years?  How common is it nowadays?
What else breaks down?


        Stefan




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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24  7:06     ` Stefan Kangas
  2022-08-24 10:40       ` Po Lu
@ 2022-08-24 12:09       ` Stefan Monnier
  2022-08-24 12:28         ` Eli Zaretskii
  1 sibling, 1 reply; 19+ messages in thread
From: Stefan Monnier @ 2022-08-24 12:09 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Po Lu, emacs-devel

>> Further more, shouldn't we make PBM versions of those icons, in case
>> librsvg is not available?
>
> There should be some kind of fallback for when SVG is not available,
> yes.  I'm not yet sure exactly what that will look like.  The problem
> with generating PBM versions AFAIK is that they don't scale, so maybe
> we'd want to prefer Unicode symbols in those cases (or even emojis,
> though I'm not exactly a huge fan).

Wherever possible we should fallback on the tty behavior if there's only
an SVG version of the icon and we don't have an SVG renderer.


        Stefan




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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 12:05           ` Po Lu
@ 2022-08-24 12:11             ` Lars Ingebrigtsen
  2022-08-24 12:28               ` Po Lu
  2022-08-24 12:21             ` Eli Zaretskii
  1 sibling, 1 reply; 19+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-24 12:11 UTC (permalink / raw)
  To: Po Lu; +Cc: Eli Zaretskii, stefankangas, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

>> If that's the tool bar displayed by Emacs (nit by the toolkit), then
>> yes, we can.  The Emacs tool bar is just a special kind of window,
>> which displays a Lisp string instead of text of some buffer.
>
> Right, but that text is a label which isn't displayed everywhere, most
> notably under NS toolkit tooltips.

But we're talking about non-toolkit displays here, so we can do what we
want.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 12:05           ` Po Lu
  2022-08-24 12:11             ` Lars Ingebrigtsen
@ 2022-08-24 12:21             ` Eli Zaretskii
  2022-08-24 12:38               ` Po Lu
  1 sibling, 1 reply; 19+ messages in thread
From: Eli Zaretskii @ 2022-08-24 12:21 UTC (permalink / raw)
  To: Po Lu; +Cc: stefankangas, emacs-devel

> From: Po Lu <luangruo@yahoo.com>
> Cc: stefankangas@gmail.com,  emacs-devel@gnu.org
> Date: Wed, 24 Aug 2022 20:05:37 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > If that's the tool bar displayed by Emacs (nit by the toolkit), then
> > yes, we can.  The Emacs tool bar is just a special kind of window,
> > which displays a Lisp string instead of text of some buffer.
> 
> Right, but that text is a label

What do you mean by "label"?

> which isn't displayed everywhere, most notably under NS toolkit
> tooltips.

If Emacs uses a tool bar provided by some toolkit, then what I said is
not relevant: Emacs doesn't display its own tool bar in those builds.

But how are tooltips relevant to this?



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

* Re: scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar
  2022-08-24 12:07     ` Stefan Monnier
@ 2022-08-24 12:27       ` Po Lu
  0 siblings, 0 replies; 19+ messages in thread
From: Po Lu @ 2022-08-24 12:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel, Stefan Kangas

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Is that the case for all the SVG renderers?

We only support one, AFAIK.

> What does "doesn't work" mean, exactly.  Does it signal an error? draw
> something with wrong colors? draw complete random noise? just silently
> does nothing?  Is the behavior the same for monochrome displays as for
> colormapped displays?

It draws big, black squares, if the rendering extension is present on
the X server.

Otherwise, it draws noise of the same kind you would expect if you
simply imported StaticColor pixel data onto a drawable created on a
PseudoColor screen.

> I've used 16bit TrueColor displays until quite recently, but can't
> remember using (or hearing someone mention the use of) a colormapped
> display in the last ... 20 years?  How common is it nowadays?

I don't know, but it's something I use Emacs with once in a while,
because a Java X server that I sometimes need to use has buggy TrueColor
support.

> What else breaks down?

Nothing, I fixed all of those earlier this year.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 12:11             ` Lars Ingebrigtsen
@ 2022-08-24 12:28               ` Po Lu
  2022-08-24 23:09                 ` Stefan Kangas
  0 siblings, 1 reply; 19+ messages in thread
From: Po Lu @ 2022-08-24 12:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Eli Zaretskii, stefankangas, emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> But we're talking about non-toolkit displays here, so we can do what we
> want.

Aren't we supposed to use the new icons on all tool bars, aside from
GTK, where we use GTK's own icons?



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 12:09       ` Stefan Monnier
@ 2022-08-24 12:28         ` Eli Zaretskii
  0 siblings, 0 replies; 19+ messages in thread
From: Eli Zaretskii @ 2022-08-24 12:28 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: stefan, luangruo, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Po Lu <luangruo@yahoo.com>,  emacs-devel@gnu.org
> Date: Wed, 24 Aug 2022 08:09:34 -0400
> 
> >> Further more, shouldn't we make PBM versions of those icons, in case
> >> librsvg is not available?
> >
> > There should be some kind of fallback for when SVG is not available,
> > yes.  I'm not yet sure exactly what that will look like.  The problem
> > with generating PBM versions AFAIK is that they don't scale, so maybe
> > we'd want to prefer Unicode symbols in those cases (or even emojis,
> > though I'm not exactly a huge fan).
> 
> Wherever possible we should fallback on the tty behavior if there's only
> an SVG version of the icon and we don't have an SVG renderer.

Between SVG and TTY there's XPM, and it would be silly on our part to
ignore that.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 12:21             ` Eli Zaretskii
@ 2022-08-24 12:38               ` Po Lu
  0 siblings, 0 replies; 19+ messages in thread
From: Po Lu @ 2022-08-24 12:38 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: stefankangas, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> What do you mean by "label"?

It's displayed next to any image, leading to a gaping hole if the image
is actually not present, on the GTK build(s).

> If Emacs uses a tool bar provided by some toolkit, then what I said is
> not relevant: Emacs doesn't display its own tool bar in those builds.

We're discussing icons that will be used under both tookit tool bars and
native tool bars.

> But how are tooltips relevant to this?

I meant "toolbars", sorry.



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

* Re: scratch/icons 09509f4fa1 05/11: Import Material design icons
  2022-08-24 12:28               ` Po Lu
@ 2022-08-24 23:09                 ` Stefan Kangas
  0 siblings, 0 replies; 19+ messages in thread
From: Stefan Kangas @ 2022-08-24 23:09 UTC (permalink / raw)
  To: Po Lu, Lars Ingebrigtsen; +Cc: Eli Zaretskii, emacs-devel

Po Lu <luangruo@yahoo.com> writes:

> Aren't we supposed to use the new icons on all tool bars, aside from
> GTK, where we use GTK's own icons?

The branch I pushed uses them on all tool bars, including GTK.



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

end of thread, other threads:[~2022-08-24 23:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <166132324164.29491.8702393664945861865@vcs2.savannah.gnu.org>
     [not found] ` <20220824064044.65239C0088A@vcs2.savannah.gnu.org>
2022-08-24  6:45   ` scratch/icons 09509f4fa1 05/11: Import Material design icons Po Lu
2022-08-24  7:06     ` Stefan Kangas
2022-08-24 10:40       ` Po Lu
2022-08-24 11:28         ` Eli Zaretskii
2022-08-24 12:05           ` Po Lu
2022-08-24 12:11             ` Lars Ingebrigtsen
2022-08-24 12:28               ` Po Lu
2022-08-24 23:09                 ` Stefan Kangas
2022-08-24 12:21             ` Eli Zaretskii
2022-08-24 12:38               ` Po Lu
2022-08-24 12:09       ` Stefan Monnier
2022-08-24 12:28         ` Eli Zaretskii
     [not found] ` <20220824064044.DC0C2C0088A@vcs2.savannah.gnu.org>
2022-08-24  6:46   ` scratch/icons 67251e79f7 09/11: Use material icons in mpc toolbar Po Lu
2022-08-24  7:21     ` Stefan Kangas
     [not found] ` <20220824064044.B7530C0088A@vcs2.savannah.gnu.org>
2022-08-24  6:50   ` scratch/icons 4de626ea22 08/11: Support using icons.el in toolbar Po Lu
2022-08-24  7:20     ` Stefan Kangas
2022-08-24 10:31       ` Po Lu
2022-08-24 12:07     ` Stefan Monnier
2022-08-24 12:27       ` Po Lu

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.