Skip to content

Changing fonts in the standard R editor

13 messages · John Warner, Bert Gunter, Ebert,Timothy Aaron +5 more

#
Dear R development  Team
I am a long time user of R with a distinctly poor vision.  I have been using the standard R interface for many years and am comfortable with it except for one minor detail.  There seems to be no way to change the font in the standard R editor.  I think that this used to be possible and would like it to be brought back in future releases.  At the moment I have many R command files with font sizes that suit my needs.  By copying these and renaming I can continue to work with fonts that I like.  It also seems to work if I start a new file in notepad and set the font size there.  I can then open this file in the R editor and the font size will be retained.  At the very least I would like to be sure that work arounds like this remain possible in any new releases.
Best
John Warner


John H. Warner, PhD, MBA
Director, Biostatistics
CHDI Management / CHDI Foundation
155 Village Boulevard, Suite 200
Princeton, NJ, 08540
(609) 945-9644: office
(609) 751-7345: cell
(609) 452-2160: fax
john.warner at CHDIfoundation.org<mailto:john.warner at CHDIfoundation.org>
#
On 2025-09-18 12:19 p.m., John Warner wrote:
John:

You mention notepad, so I assume you're working on Windows.  But there 
are several possible editors you could be using there.  Are you running 
Rgui.exe and using the built in editor?  Or RStudio?  Or something else?

I'm not on Windows, so I can't recommend the best editor to use, but 
there are multiple choices possible.

Duncan Murdoch
#
By "standard R editor" to you mean the RGUI editor that ships with R? On my
Mac platform, it has menu entries in the "Format" menu that allow you to
choose different fonts and sizes. On Windows, of course, the menus may be
organized differently, but I would assume there's something similar. If you
mean some other editor (e.g. see ?edit), then you need to dig into their
docs. Again, I assume something similar would be available.

Cheers,
Bert



On Thu, Sep 18, 2025 at 11:36?AM John Warner <John.Warner at chdifoundation.org>
wrote:

  
  
#
In RStudio there is the "View" tab at the top, and within that there is "Zoom in" and "Zoom out". I like RStudio enough that I have not explored other options, and I do not have abundant time to make the exploration. RStudio does what I need, so I move on.

Tim

-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Duncan Murdoch
Sent: Thursday, September 18, 2025 2:54 PM
To: John Warner <John.Warner at chdifoundation.org>; r-help at r-project.org
Subject: Re: [R] Changing fonts in the standard R editor

[External Email]
On 2025-09-18 12:19 p.m., John Warner wrote:
John:

You mention notepad, so I assume you're working on Windows.  But there are several possible editors you could be using there.  Are you running Rgui.exe and using the built in editor?  Or RStudio?  Or something else?

I'm not on Windows, so I can't recommend the best editor to use, but there are multiple choices possible.

Duncan Murdoch

______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
#
I am on windows. In the R editor that comes with the R installation I can go to the "Edit" menu and thence to the "GUI preferences" at the bottom of the drop down. I get a pop up (that I cannot show) and there is a "Font" section that allows you to change font, and size, and style. Size options go up to 36 point font, but have many smaller options. The apply button at the bottom lets me see the results without closing the window.

Tim

-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Bert Gunter
Sent: Thursday, September 18, 2025 2:59 PM
To: John Warner <John.Warner at chdifoundation.org>
Cc: r-help at r-project.org
Subject: Re: [R] Changing fonts in the standard R editor

[External Email]

By "standard R editor" to you mean the RGUI editor that ships with R? On my Mac platform, it has menu entries in the "Format" menu that allow you to choose different fonts and sizes. On Windows, of course, the menus may be organized differently, but I would assume there's something similar. If you mean some other editor (e.g. see ?edit), then you need to dig into their docs. Again, I assume something similar would be available.

Cheers,
Bert



On Thu, Sep 18, 2025 at 11:36?AM John Warner <John.Warner at chdifoundation.org>
wrote:
______________________________________________
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.r-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
#
On 2025-09-18 2:58 p.m., Bert Gunter wrote:
I don't think it is available in Rgui.exe.  I believe that as Tim 
describes, there's just one choice of font, you don't get "rich text" 
like you do in the Mac R.app editor.

Duncan Murdoch
#
Hello,

Here are two screen captures that illustrate how to change fonts and 
their size and style in RGui.

Though it's an option, I don't see the point in changing the style to 
bold permanently, increase the size instead.

Do not forget to click <Apply> when done.

Hope this help,

Rui Barradas
On 9/18/2025 8:27 PM, Ebert,Timothy Aaron wrote:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Captura de ecr? 2025-09-18 204351.png
Type: image/png
Size: 36675 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20250918/e942037c/attachment.png>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Captura de ecr? 2025-09-18 204600.png
Type: image/png
Size: 41973 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20250918/e942037c/attachment-0001.png>
#
On 9/18/25 15:34, Duncan Murdoch wrote:
But did font size *used* to be adjustable in Rgui.exe?  "I think that 
this used to be possible"

   I don't know exactly where to look for changes, I was looking at 
history of stuff in R/src/gnuwin32 (especially editor.h, editor.c) but 
didn't get very far.  Maybe things also changed in the upstream Windows 
libraries, i.e. Rtools ? MINGW-w64, etc. ??

  
    
#
On 2025-09-18 4:08 p.m., Ben Bolker wrote:
Look here:

   https://github.com/wch/r-source/blob/trunk/src/gnuwin32/editor.c

No sign of any big changes there.  The last ones to talk about fonts or 
other display issues were in 2008.

Duncan Murdoch
#
On 9/18/25 16:17, Duncan Murdoch wrote:
I saw that, but as I mentioned I didn't know whether changes 
elsewhere in the pipeline (Rtools, Windows libraries etc.) might also 
have had an effect ...

   cheers
     Ben B.

  
    
#
Bert and  Duncan
I am happy with the simple editor that ships with R except for the issue with fonts.  I simply cannot find s way to change them in 4.2.0. I can change the font on the console and am sure that in previous versions of R I could change the fonts in the editor. Any help I could get with this would be greatly appreciated.  Maybe I should  raise this with the development team? And yes, I am using a windows server.
Thanks
John


Be
On Sep 18, 2025, at 3:35?PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

        
? On 2025-09-18 2:58 p.m., Bert Gunter wrote:
I don't think it is available in Rgui.exe. I believe that as Tim
describes, there's just one choice of font, you don't get "rich text"
like you do in the Mac R.app editor.

Duncan Murdoch

  
  
#
I tried and confirmed that I could change the font (not just the font size,
but the font itself) in the script editor inside Rgui, the default GUI of R
in Windows, although I found out how accidentally. I tried both R 4.3.2 and
R 4.5.1 on Windows 11,

When I changed the font and clicked "Apply", only the font in the
console changed immediately. I also thought the font in the script editor
could not be changed. But when I closed the active script window, opened a
new one, and typed something, I confirmed that the font in the script was
the same font I saw in the console.

This also applies to saved R scripts. They will use the font of the console
if I change it, when I open them *after* I changed the font.

Ideally, the font in all windows should change at the same time when we
click "Apply." It is not the case now. Closing and reopening a script is a
workaround for now.

Regards,
Shu Fai

On Fri, Sep 19, 2025 at 2:13?PM John Warner <John.Warner at chdifoundation.org>
wrote:

  
  
#
John,
I have 4.3.1 and 4.2.1 on a Windows machine.  If I open Rgui, change and
save the settings to the default directory (documents) and the default file
name (Rconsole) , the settings are reloaded when I open RGui again.

Greg

On Fri, 19 Sept 2025 at 16:13, John Warner <John.Warner at chdifoundation.org>
wrote: