unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to set monospace font with .emacs shared between ubuntu and Cygwin
@ 2024-09-25 18:32 KARR, DAVID
  2024-09-26  6:02 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: KARR, DAVID @ 2024-09-25 18:32 UTC (permalink / raw)
  To: Help-gnu-emacs@gnu.org

I have Cygwin emacs 29.4 running on my Windows laptop.  I have an Ubuntu VM running on that laptop, which is running Emacs 27.1.  I am trying to use the same .emacs file through a shared folder.  For most things, this works perfectly fine.  My Cygwin Emacs is using a proper monospace font, but the VM is using a proportional font.  I'd prefer that they both used the same font, but at a minimum, the Ubuntu VM needs to use a monospace font.

In my Cygwin Emacs, I ran "list-fonts" and got this:
-----------------
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
Fontset: -*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-standard
Fontset: -outline-Courier New-regular-normal-normal-mono-13-*-*-*-c-*-fontset-startup
-----------------

In my Ubuntu VM Emacs, I did the same and got this:
-------------
Fontset: -DAMA-Ubuntu-normal-normal-normal-*-17-*-*-*-*-0-fontset-auto1
Fontset: -DAMA-Ubuntu-normal-normal-normal-*-13-*-*-*-*-0-fontset-auto2
Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard
Fontset: -DAMA-Ubuntu Mono-normal-normal-normal-*-17-*-*-*-m-0-fontset-startup
--------------

My .emacs currently has no customization related to fonts, except for "(global-font-lock-mode 1)" (I don't even remember what that does, and the associated descriptions are circular).

What are my options here?




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to set monospace font with .emacs shared between ubuntu and Cygwin
  2024-09-25 18:32 How to set monospace font with .emacs shared between ubuntu and Cygwin KARR, DAVID
@ 2024-09-26  6:02 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-09-26  6:02 UTC (permalink / raw)
  To: Help-gnu-emacs

> From: "KARR, DAVID" <dk068x@att.com>
> Date: Wed, 25 Sep 2024 18:32:02 +0000
> 
> I have Cygwin emacs 29.4 running on my Windows laptop.  I have an Ubuntu VM running on that laptop, which is running Emacs 27.1.  I am trying to use the same .emacs file through a shared folder.  For most things, this works perfectly fine.  My Cygwin Emacs is using a proper monospace font, but the VM is using a proportional font.  I'd prefer that they both used the same font, but at a minimum, the Ubuntu VM needs to use a monospace font.
> 
> In my Cygwin Emacs, I ran "list-fonts" and got this:
> -----------------
> Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
> Fontset: -*-courier new-normal-r-*-*-13-*-*-*-c-*-fontset-standard
> Fontset: -outline-Courier New-regular-normal-normal-mono-13-*-*-*-c-*-fontset-startup
> -----------------
> 
> In my Ubuntu VM Emacs, I did the same and got this:
> -------------
> Fontset: -DAMA-Ubuntu-normal-normal-normal-*-17-*-*-*-*-0-fontset-auto1
> Fontset: -DAMA-Ubuntu-normal-normal-normal-*-13-*-*-*-*-0-fontset-auto2
> Fontset: -*-*-*-*-*-*-*-*-*-*-*-*-fontset-default
> Fontset: -*-fixed-medium-r-normal-*-16-*-*-*-*-*-fontset-standard
> Fontset: -DAMA-Ubuntu Mono-normal-normal-normal-*-17-*-*-*-m-0-fontset-startup
> --------------
> 
> My .emacs currently has no customization related to fonts, except for "(global-font-lock-mode 1)" (I don't even remember what that does, and the associated descriptions are circular).
> 
> What are my options here?

My suggestion is to have your .emacs file specify the default font for
Ubuntu, using the system-type variable as the dispatch.  Find a font
on Ubuntu that you like, and then add to .emacs something like

  (unless (memq system-type '(cygwin windows-nt))
    (add-to-list 'default-frame-alist
      '(font . "YOUR-PREFERRED-FONT-HERE")))

To find out the correct specification of YOUR-PREFERRED-FONT-HERE,
start Emacs on Ubuntu, try different fonts (including sizes) until you
find one that you like, and then type "M-: (face-font 'default) RET".
This should produce the font string you can use in the above.

To try different fonts, you can use S-mouse-1, then select "Change
Buffer font" from the popup menu, which will display a font selection
dialog.  Alternatively, Options->"Set Default Font" from the menu bar
will show a similar font selection dialog.

HTH



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-26  6:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-25 18:32 How to set monospace font with .emacs shared between ubuntu and Cygwin KARR, DAVID
2024-09-26  6:02 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).