masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

Fractional Scaling #92

Open Thaodan opened 3 years ago

Thaodan commented 3 years ago

Is that supported? I tried to set it up with:

export GDK_DPI_SCALE=0.5
export GDK_SCALE=2

However I can't make it work. My DE is Plasma 20.0.5.

fejfighter commented 3 years ago

I don't think we explicitly do support GDK_DPI_SCALE, it's listed as a x specific in gtk3 documentation

is your plasma session running on X or wayland? apparently neither work on wayland, but are expected to have some effect on X

masm11 commented 3 years ago

https://developer.gnome.org/gtk3/stable/gtk-x11.html#x11-envar

I didn't implement X11-specific feature explicitly.

Thaodan commented 3 years ago

My session is on X11.

Anyway fractional scaling support would be great. 2.0 scaling is to be for me on 4k and 27".

masm11 commented 3 years ago

OK, I'll consider whether it can be implemented. Does X-build emacs support it?

Thaodan commented 3 years ago

OK, I'll consider whether it can be implemented. Does X-build emacs support it? Not really but you can use the XRessource Xft.dpi to simulate it.

masm11 commented 3 years ago

I don't use Xft.dpi because I can't get it in pure-gtk way. Instead, I'll use GDK_DPI_SCALE.

Thaodan commented 3 years ago

I don't use Xft.dpi because I can't get it in pure-gtk way. Sure but you asked about the GTK build that had X11 bits next to GTK.

masm11 commented 3 years ago

Sure but you asked about the GTK build that had X11 bits next to GTK.

Sorry, I misunderstood your words.

Thanks. I'll implement in pgtk while referring to how to use Xft.dpi in X-build.

masm11 commented 3 years ago

I tried to support GDK_DPI_SCALE, and push it to feature/pgtk of https://github.com/masm11/emacs. Could you try it?

masm11 commented 3 years ago

Did you try it?

oabdullah1 commented 3 years ago

For what is worth I tried the latest code from emacs-mirror:feature/pgtk and it supports fractional scaling under Wayland already without this patch. Maybe it's only required for X11?

masm11 commented 3 years ago

@oabdullah1 Yes, it's only for X11.

Thaodan commented 3 years ago

Hey sorry for the late reply.

It works for the ui however fonts are not scaled up (compare the fonts on the ui in grey vs. the text black/white). Screenshot_20210419_023904

masm11 commented 3 years ago

It works on my GNOME(Xorg). Did you try feature/pgtk on https://github.com/masm11/emacs, not savannah? savannah's one doesn't contains this support.

scaled

I'll try it on Plasma later.

masm11 commented 3 years ago

It works on Plasma 5.21.4.

works_on_plasma