[IAEP] Set GNU GPL in monospace font

Daniel Narvaez dwnarvaez at gmail.com
Sat Feb 15 13:44:57 EST 2014


Hi,

the best place to post this is sugar-devel, also put [DESIGN] in the title
to attract design team attention. Thanks!


On 15 February 2014 19:43, Ryan Cunningham <rvskmbrly3 at gmail.com> wrote:

> Are any of you convinced to set the GNU GPL in a monospace font in the
> 'About My Computer' control panel? If so, here's a patch for it (at the
> bottom).
>
> The GNU GPL text file (v2.0) looks quite bad in a proportional font; but
> someone over at your GitHub repositories said that proportional fonts are
> better for dyslexic people.
>
> Here, I import an additional standard PyGTK class, "Pango" (from the
> module "gi.repository"), to handle font switching.
>
> ---
> diff --git a/extensions/cpsection/aboutcomputer/view.py
> b/extensions/cpsection/aboutcomputer/view.py
> index 6235e5c..5714145 100644
> --- a/extensions/cpsection/aboutcomputer/view.py
> +++ b/extensions/cpsection/aboutcomputer/view.py
> @@ -18,7 +18,7 @@
>
>  from gettext import gettext as _
>
> -from gi.repository import Gtk
> +from gi.repository import Gtk, Pango
>  from gi.repository import Gdk
>
>  from sugar3.graphics import style
> @@ -206,6 +206,8 @@ def license_expander_cb(self, expander, param_spec):
>              view_license = Gtk.TextView()
>              view_license.set_editable(False)
>              view_license.get_buffer().set_text(self._model.get_license())
> +            fd = Pango.FontDescription('Monospace')
> +            view_license.modify_font(fd)
>              view_license.show()
>              expander.add(view_license)
>          else:
> _______________________________________________
> IAEP -- It's An Education Project (not a laptop project!)
> IAEP at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/iaep
>



-- 
Daniel Narvaez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/iaep/attachments/20140215/58b68dfa/attachment.html>


More information about the IAEP mailing list