]> asedeno.scripts.mit.edu Git - PuTTY.git/commit
gtkfont: refactor parse/unparse of XLFDs.
authorSimon Tatham <anakin@pobox.com>
Sun, 13 Nov 2016 12:02:13 +0000 (12:02 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 13 Nov 2016 13:50:18 +0000 (13:50 +0000)
commitd9c68d236bf501bb66d2da0bcebc34279690986b
treef573ba1b1b296b02ee0330ae2103b54822bf91c1
parent22013390c47ee27a2e2cab67b71b490dea6d475d
gtkfont: refactor parse/unparse of XLFDs.

There were already two places in the code (x11font_enum_fonts and
x11_guess_derived_font_name) where we retrieved an XLFD from the X
server, sawed it up ad-hoc into its '-'-separated parts and accessed
them by numeric index.

I'm about to add a third, so before I do, let's turn this into a
somewhat principled system where we get to do the decode/encode in
just one place and call all the individual fields by names that are
actually memorable.

No functional change intended by this commit.
unix/gtkfont.c