2

I want to be able to set the default font in the TeXworks editor to Courier Bold 12pt.

I currently have the typeface set to Courier and the fontsize set to 12pt by changing some settings in the menu Edit->Preferences...->Editor, however there doesn't seem to be any options available to setting the default font to bold. This renders the text too thin to be easily read on my monitor.

I already know that the font can be temporarily boldened at Format->Fonts... but this means I have to enter this menu each time I open a document.

Swisle
  • 23
  • on windows, texworks stores the default font in the registry. unfortunately, the format is unclear: MS Shell Dlg 2,14,-1,5,50,0,0,0,0,0. Surely someone on the mailing list would know. – Mark Apr 11 '17 at 03:07
  • here link we find: `\HKEY_CURRENT_USER\Software\TUG\TeXworks

    font family (for example "Courier New") point size (default = 10) pixel size (-1 = default) style hint (what to do if requested family can't be found; 5 = AnyStyle = default) weight (50 = normal, 25 = light, 63 = semibold, 75 = bold, 87 = black) italic (0 = no) underline (0 = no) strikeout (0 = no) fixedPitch (1 = yes) raw (0 = no)`

    – peter Apr 14 '21 at 22:51
  • i made myself a .reg file with content `Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\MiKTeX.org\MiKTeX\2.9\TeXworks] "font"="Courier New,12,-1,5,75,0,0,0,0,0"`.

    – peter Apr 14 '21 at 23:00

2 Answers2

1

It is possible to do this with some CSS. See How can I set a dark theme in TeXworks? for the general method of using a custom CSS file for TeXworks. In the .css file itself, you need this:

QTextEdit {
  font-weight: bold;
}

(Short description of method: save foo.css somewhere, and run TeXworks with texworks -stylesheet /path/to/foo.css.)

Left, default weight, right bold weight.

texworks

Torbjørn T.
  • 206,688
0

texworkpref

You can choose any font you like whether it is bold, light etc.,

murugan
  • 1,669
  • Swisle knows about this, he's asking how you can set the weight of the chosen font to bold, as you can do under Format --> Font. – Torbjørn T. May 13 '16 at 06:43
  • Since Courier Bold is different font (i.e. a different file) than Courier, it should appear in the list if it's installed on the OS, should not it? – ebosi May 13 '16 at 07:48
  • Unfortunately ebo, Courier Bold does not appear in the drop down list. – Swisle May 13 '16 at 07:59
  • @Swisle Then you probably don't have it installed. You could try googling for e.g. courier bold download and see if you find a font file that you can install to your system. – Torbjørn T. Jun 12 '16 at 08:28