[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Frame shifted upwards upon changing font size
From: |
uzibalqa |
Subject: |
Re: Frame shifted upwards upon changing font size |
Date: |
Tue, 13 Sep 2022 12:25:27 +0000 |
------- Original Message -------
On Tuesday, September 13th, 2022 at 12:10 PM, uzibalqa <uzibalqa@proton.me>
wrote:
> ------- Original Message -------
> On Tuesday, September 13th, 2022 at 11:29 AM, Eli Zaretskii eliz@gnu.org
> wrote:
>
>
>
> > > Date: Tue, 13 Sep 2022 04:27:17 +0000
> > > From: uzibalqa uzibalqa@proton.me
> > >
> > > I have a setup that opens emacs at the centre of the screen.
> > >
> > > But then I want to have a specific font size and call
> > >
> > > (set-face-attribute 'default nil :height 160 :weight 'bold)
> > >
> > > This puts the menu-bar outside the screen. What can I do to keep the
> > > window at the
> > > center of the screen?
> >
> > I'd try changing default-frame-alist instead of using
> > set-face-attribute. Maybe it will work better.
> >
> > If that doesn't work, change the order between face customizations and
> > setting up the frame coordinates (assuming you do the latter from the
> > init file).
> >
> > In general, what you want is somewhat tricky: Emacs cannot call GUI
> > functions until it has at least one GUI frame, so at best you might
> > see the frame momentarily displayed at the wrong place/with wrong font
> > size before it settles.
>
>
> default-frame-alist is a confusing as it already has (width . 75) and
> (height . 21) for the frame. What is the corresponding entry for
> the font height?
Have found that default-frame-alist much trickier to use. If I set
(top . 21) (left . 21) the frame might get placed on a different
monitor than from the monitor emacs was called.
Have also done a frame-inhibit-implied-resize, this fixes the top-bottom
centering
but not the left-right centering. Looks as if we need a new function that
ensures
the frame is centered.
(setq initial-frame-alist '((width . 75) (height . 21)))
(setq frame-inhibit-implied-resize t)
(set-face-attribute 'default nil :height 160 :weight 'bold)
(setq frame-inhibit-implied-resize nil)
- Frame shifted upwards upon changing font size, uzibalqa, 2022/09/13
- Re: Frame shifted upwards upon changing font size, Eli Zaretskii, 2022/09/13
- Re: Frame shifted upwards upon changing font size, uzibalqa, 2022/09/13
- Re: Frame shifted upwards upon changing font size,
uzibalqa <=
- Re: Frame shifted upwards upon changing font size, Gregory Heytings, 2022/09/13
- Re: Frame shifted upwards upon changing font size, uzibalqa, 2022/09/13
- Re: Frame shifted upwards upon changing font size, Gregory Heytings, 2022/09/13
- Re: Frame shifted upwards upon changing font size, uzibalqa, 2022/09/13
- Re: Frame shifted upwards upon changing font size, Gregory Heytings, 2022/09/13
- Re: Frame shifted upwards upon changing font size, uzibalqa, 2022/09/13
- Re: Frame shifted upwards upon changing font size, Robert Pluim, 2022/09/14
- Re: Frame shifted upwards upon changing font size, uzibalqa, 2022/09/14
- Re: Frame shifted upwards upon changing font size, Robert Pluim, 2022/09/15
- Re: Frame shifted upwards upon changing font size, uzibalqa, 2022/09/15