From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa Newsgroups: gmane.emacs.help Subject: Re: Frame shifted upwards upon changing font size Date: Tue, 13 Sep 2022 12:10:22 +0000 Message-ID: References: <831qsf5x8j.fsf@gnu.org> Reply-To: uzibalqa Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18334"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 13 14:11:35 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oY4lK-0004d6-R2 for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 14:11:35 +0200 Original-Received: from localhost ([::1]:57788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oY4lJ-0002GU-Re for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 08:11:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oY4kS-0002G5-Hn for help-gnu-emacs@gnu.org; Tue, 13 Sep 2022 08:10:41 -0400 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]:58423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oY4kK-0007Ae-Lv; Tue, 13 Sep 2022 08:10:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=ej2ktow42vawljyklq4sdfjkjy.protonmail; t=1663071030; x=1663330230; bh=xcIpwqOWVlUAIdwI82hdBhPP1KIyS22JVrk/DTMPmnA=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=d0GuiBDIoTGhwnd8+6+AITfHlsERVwjJUYeKgIi8xGuj9OWxja0rPInPX4IFQTtRj bR/WM1dJCzvImqFpvczIuK+Csd/brnlQ0lJk4wiKJ39i5UvGsCuM7/MkfQqSOlIV1R owlKN8S5/KeBIGyTsSzlFvge3r64dIpdMkgXAx7O3Rx903zaUBlVEx9f1WiUigYkJS DST7acmm3FfEUDqtTlncCQgEFav1bkH5mTg8ljuZXxwCOwAxxAJLzVJVRESWTJDUEe E/mbxcQpTMG50bGCt9/ePvDaVWgzy5HYGzWqtZrtmbkCtCUAwpimZk1gpQwcOxDjHu y1GO+RHtmyDcA== In-Reply-To: <831qsf5x8j.fsf@gnu.org> Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.43.25; envelope-from=uzibalqa@proton.me; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139437 Archived-At: ------- Original Message ------- On Tuesday, September 13th, 2022 at 11:29 AM, Eli Zaretskii = wrote: > > Date: Tue, 13 Sep 2022 04:27:17 +0000 > > From: uzibalqa uzibalqa@proton.me > >=20 > > I have a setup that opens emacs at the centre of the screen. > >=20 > > But then I want to have a specific font size and call > >=20 > > (set-face-attribute 'default nil :height 160 :weight 'bold) > >=20 > > This puts the menu-bar outside the screen. What can I do to keep the wi= ndow at the > > center of the screen? >=20 >=20 > I'd try changing default-frame-alist instead of using > set-face-attribute. Maybe it will work better. >=20 > 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). >=20 > 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=20 (height . 21) for the frame. What is the corresponding entry for the font height?