[chirp_devel] [developer] Control fontsize of hex diff/dump display - #1681

Dan Smith
Thu Jun 5 16:15:07 PDT 2014


> +    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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20140605/024aef9f/attachment-0001.bin 


More information about the chirp_devel mailing list