5 Jun
2014
5 Jun
'14
4:15 p.m.
- try:
fontsize = CONF.get_int("diff_fontsize", "developer")
- except Exception:
fontsize = 11
If you're going to add hidden configuration options (which I think is probably reasonable for these sorts of things), lets start a README.developers in the top level directory where we at least mention that they exist.
Also, please don't just catch Exception, here, catch whatever ConfigParser raises if it's not there.
- fontdesc = pango.FontDescription("Courier 11")
- fontdesc = pango.FontDescription("Courier %i" % fontsize)
I think some fonts don't have all the sizes between 1 and infinity. What happens if you specify something unsupported? If it's something we can catch and fall back to 11 again, that'd be good. That said, if it's a hidden developer-only tunable, it's not a huge deal.
But in general, if this makes things easier for you, I'm cool with it.
Thanks!
--Dan