Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 2x splash image for Mac port with Retina display. #389

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mituharu
Copy link

Emacs Mac port supports high-resolution (2x) image display for Retina displays.
One way to do that is just to add a file NAME@2x.EXT in parallel with existing NAME.EXT (no need to change Lisp code).
This pull request adds a 2x splash screen image so it looks crispier on Retina displays.

In relation to that, I'd also like to improve toolbar icons on Retina displays (and Dark Mode on macOS 10.14).
README in the images directory tells that most of the images are created with Gimp and Inkscape.
If the toolbar icons are originally created as larger bitmaps or resolution-independent data like SVG and the original data are available somewhere, then I can generate high-resolution toolbar icons for Retina displays as multi-image TIFF data that Emacs Mac port prefers.

Copy link
Member

@erikmd erikmd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mituharu! LGTM

In relation to that, I'd also like to improve toolbar icons on Retina displays (and Dark Mode on macOS 10.14).
README in the images directory tells that most of the images are created with Gimp and Inkscape.
If the toolbar icons are originally created as larger bitmaps or resolution-independent data like SVG and the original data are available somewhere, then I can generate high-resolution toolbar icons for Retina displays as multi-image TIFF data that Emacs Mac port prefers.

I don't know if such sources are available somewhere... Maybe @DavidAspinall would know?

@cpitclaudel
Copy link
Member

If the toolbar icons are originally created as larger bitmaps or resolution-independent data like SVG and the original data are available somewhere, then I can generate high-resolution toolbar icons for Retina displays as multi-image TIFF data that Emacs Mac port prefers.

Slightly off-topic, but: is there any reason not to use SVG icons directly?

@mituharu
Copy link
Author

Slightly off-topic, but: is there any reason not to use SVG icons directly?

Because it takes time to setup WebKit (used for rendering SVG images in the Mac port) and makes startup slow.
For this reason, the Mac port uses PNG for the startup Emacs splash image. ("About Emacs" uses SVG, though.)
Also, SVG support in Emacs does not support alpha channel, so it is not suitable for toolbar icons.
I've actually once tried to support alpha channel in the WebKit support code, but I abandoned it because the platform-independent librsvg support code does not do that, and text LCD smoothing requires opaque background.

@cpitclaudel
Copy link
Member

cpitclaudel commented Sep 11, 2018

Also, SVG support in Emacs does not support alpha channel, so it is not suitable for toolbar icons.

Do you mean just on macOS? It works fine on GNU/Linux, AFAICT, and I use it in F*-mode. This is how it looks:

screenshot from 2018-09-11 15-56-15

@mituharu
Copy link
Author

Also, SVG support in Emacs does not support alpha channel, so it is not suitable for toolbar icons.

Do you mean just on macOS?

Emacs built with GTK+ first tries to let GTK+ render toolbar icon images and falls back on Emacs's own image rendering (see xg_get_image_for_pixmap in gtkutil.c). That's why SVG in the toolbar on GTK+ supports alpha channel but not inside Emacs buffers.

@Matafou
Copy link
Contributor

Matafou commented Apr 10, 2020

Do we want to merge this as is? IS there something more to do?
Concerning toolbar icons this could be done in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants