Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Saturday, March 08, 2008

jEdit macro: Toggling between proportional and monospaced fonts

Here's a jEdit macro to toggle between a nice proportional font and a not-bad monospaced font:
if (jEdit.getProperty("view.font") == "Franklin Gothic Medium") {
jEdit.setIntegerProperty("view.fontsize", 19);
jEdit.setProperty("view.font", "DejaVu Sans Mono");
jEdit.propertiesChanged();
} else {
jEdit.setIntegerProperty("view.fontsize", 22);
jEdit.setProperty("view.font", "Franklin Gothic Medium");
jEdit.propertiesChanged();
}

I like jEdit's choice of macro language (Java). And you can assign a keyboard shortcut to any macro (I'm using F9).

Fli139

Fli13A

0 Comments:

Post a Comment

<< Home