From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Mekeor Melire Newsgroups: gmane.emacs.help Subject: Re: Default font / size Date: Wed, 21 Jun 2017 01:30:47 +0200 Message-ID: <8760fqqlso.fsf@gmail.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1498017278 25256 195.159.176.226 (21 Jun 2017 03:54:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Jun 2017 03:54:38 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.2.1 Cc: "help-gnu-emacs@gnu.org" To: John Mastro Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 21 05:54:33 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dNWiu-0006K9-UB for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Jun 2017 05:54:33 +0200 Original-Received: from localhost ([::1]:51709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNWj0-0007Vg-0U for geh-help-gnu-emacs@m.gmane.org; Tue, 20 Jun 2017 23:54:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dNSbm-000067-JU for help-gnu-emacs@gnu.org; Tue, 20 Jun 2017 19:30:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dNSbl-00079E-LX for help-gnu-emacs@gnu.org; Tue, 20 Jun 2017 19:30:54 -0400 Original-Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]:34981) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dNSbl-000797-DS for help-gnu-emacs@gnu.org; Tue, 20 Jun 2017 19:30:53 -0400 Original-Received: by mail-wr0-x230.google.com with SMTP id y25so72206441wrd.2 for ; Tue, 20 Jun 2017 16:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=0+Lz9sWfujbcw2BDVli4sTFYTzxzzxYQlx39moIlYzI=; b=tznc66hx3rIj18lrTvlbKMYEKnednmu1ad7oMPhNG2ZNnVTJaBSv417IfWC9bSC//U fOcosd9jtccZ/torhgeSmF1mQqC5yntGZujI5U14ybz9B9QIYRyCFKnz9DpCnWQ3jAVK 2f4L5yRRRw3KC9hyrq4FvaxvTbvDLubEIVYnDyMmhoqvzchtLbSkf0/YEh9O9BW2Ze6U zpcvSxsv24BNhas357e9/Vuj4TmZhsJy6n2xSHZPAh1icj9u4+GhqGImF9Jz9kwFcQAf 3Ubq3+FUao86pVciwM3nZZvWJbkdNJNwEuz3FYMz8u3NBROIe6aY+vbZ7tBZpZ/TcLl9 QNKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=0+Lz9sWfujbcw2BDVli4sTFYTzxzzxYQlx39moIlYzI=; b=VuzQOykRYLuFnFhCZt3ysV8V9JNyW0PmCAfu4BITrN5MSACWJ1hN/xQXt40bZb/6hv RrjZ+f+DxTJVMMLk9TFuGMucrWVO9CqnLTvoFTLEPvaxSoveRKRizylF/ZY10WRCZ+sf YhJIk96Xl/Ls9hBR1HWIwEwJ9uUIOJGYDH8fplEEmYTIFJwH/NTX4Qd+yb6rei8VKXPc WW7d905p2uc2ij5xH4w1Ljyin7Roouem4cLbx/IufsWr8ALUoXUq3wm3rhLYuwwmtZE+ gDhi30aoc1RIbgmgBhR2tqE8pAiiVvIQZJvulm73c89o9fNCThsfNJoM45YE5wtl1mZT UVvQ== X-Gm-Message-State: AKS2vOwHm/YQbB7XzQpbSUW0EbuBz7n31FXJyEFi9yh1A9GrnFvw72Pj 4X7Ek4G0bEtWdzEd8Nk= X-Received: by 10.223.145.78 with SMTP id j72mr20931431wrj.7.1498001450533; Tue, 20 Jun 2017 16:30:50 -0700 (PDT) Original-Received: from delire. ([2001:a61:224e:dd01:8d53:1a42:170f:99d7]) by smtp.gmail.com with ESMTPSA id a28sm19307535wra.17.2017.06.20.16.30.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2017 16:30:49 -0700 (PDT) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::230 X-Mailman-Approved-At: Tue, 20 Jun 2017 23:53:55 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:113542 Archived-At: --=-=-= Content-Type: text/plain John Mastro writes: > The default font in "emacs -Q" in "Courier New-10.0". I'd like to change > that to "Consolas-10.0" via Lisp code, but without explicitly specifying > the font size of "10.0"[1]. > > Is there any way to do that? My first thought was to try > > (add-to-list 'default-frame-alist '(font . "Consolas")) > > but that results in "Consolas-12". > > [1]: My goal is to avoid having to specify a different font size for > each of the systems on which I use Emacs, since Emacs presumably > has logic to pick a reasonable font size. Personally, I do exactly that: For each host, I specify my favorite font-size. If you want to have a look at the relevant part of my init.el, take a look at the inline-attachment at the end of this mail or at this link (to a proprietary web-service): https://github.com/mekeor/config/blob/master/home/mekeor/.emacs.d/init.el#L1-L28 Sorry for not being helpful by not answering your question. I'd also like to know if there is a solution like what you're hoping for. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=init.snip.el Content-Transfer-Encoding: quoted-printable Content-Description: init.snip.el ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;; ;;;; Configuration Configuration (require 'cl) (cl-defun own/by-host (&key melibre delire menixe imac macbook linux mac otherwise) (cond ((and (member system-name '("melibre" "menixe" "delire" )) linux = ) linux) ((and (member system-name '("macbook" "Noobs-iMac.local")) mac = ) mac) ((and (member system-name '("delire" )) delire= ) delire) ((and (member system-name '("melibre" )) melibr= e) melibre) ((and (member system-name '("menixe" )) menixe= ) menixe) ((and (member system-name '("Noobs-iMac.local" )) imac = ) imac) ((and (member system-name '("macbook" )) macboo= k) macbook) (t = otherwise))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;;;;; ;;;; Default Font (set-face-attribute 'default nil :family "Hack" :height (own/by-host :melibre 110 :delire 109 :menixe 130 :imac 160 :macbook 120)) --=-=-=--