mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-15 10:07:39 -05:00
Support for using variable-pitch fonts for the terminal on Windows.
Done in much the same way as it is in the GTK front end: the character
cell width is determined using the font's digits (which seems to give
generally not-too-offensive spacing in most cases, at the expense of
Ms and Ws typically overhanging a bit into adjacent cells) and each
character is centred in its cell. Overhangs never leave permanent
droppings on the window, because the existing work done in r5003
handles them just fine even in this stressful scenario.
There's a hacky new checkbox in the Appearance panel to make
variable-pitch fonts appear in the font selector (they still don't by
default, because I still think it's _usually_ not What You Want); the
checkbox state is not actually stored as part of a saved session, but
it should be automatically ticked when reloading a session that's got
a variable pitch font selected.
(I'm half-expecting a potential flurry of requests for this feature in
the wake of http://xkcd.com/840/ , so I thought I'd pre-empt them :-)
[originally from svn r9063]
[r5003 == ba470dec5e
]
This commit is contained in:
@ -316,6 +316,7 @@ struct dlgparam {
|
||||
struct { unsigned char r, g, b, ok; } coloursel_result; /* 0-255 */
|
||||
tree234 *privdata; /* stores per-control private data */
|
||||
int ended, endresult; /* has the dialog been ended? */
|
||||
int fixed_pitch_fonts; /* are we constrained to fixed fonts? */
|
||||
};
|
||||
|
||||
/*
|
||||
@ -374,6 +375,10 @@ void fwdsetter(struct ctlpos *cp, int listid, char *stext, int sid,
|
||||
char *btext, int bid,
|
||||
char *r1text, int r1id, char *r2text, int r2id);
|
||||
|
||||
void dlg_auto_set_fixed_pitch_flag(void *dlg);
|
||||
int dlg_get_fixed_pitch_flag(void *dlg);
|
||||
void dlg_set_fixed_pitch_flag(void *dlg, int flag);
|
||||
|
||||
#define MAX_SHORTCUTS_PER_CTRL 16
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user