After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152730 - RFE: Text size plugin (zoom)
RFE: Text size plugin (zoom)
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
git master
Other All
: Normal enhancement
: ---
Assigned To: Gedit maintainers
Gedit maintainers
AP3
Depends on:
Blocks:
 
 
Reported: 2004-09-15 16:17 UTC by Paolo Maggi
Modified: 2019-03-23 20:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Plugin to zoom in / zoom out text in gedit (3.30 KB, application/x-gzip)
2008-06-22 14:29 UTC, Konstantin Mikhaylov
Details

Description Paolo Maggi 2004-09-15 16:17:20 UTC
I think we should write a simple Zoom plugin.
It should add a View->Zoom submenu with the following items

Smaller Ctrl+-
Larger  Ctrl++
-------
Normal Size  Ctrl+=

In this way the user will be able to increase or decrease the font size of the
active document for the current work session.
Comment 1 Alan Horkan 2004-09-29 18:44:35 UTC
I think a Zoom like you suggest would be a good accessibility improvement, and
I'm pretty sure I'd make good use of it too.  

> Normal Size  Ctrl+=

Revised HIG 2.0 has Normal Size  Ctrl+0 so that you can have both 
Zoom In for use both Ctrl++ and Ctrl+= which keeps things simple for both
European and American keyboards.  

For only three menu items it is hardly worth a submenu, grouping them with a
seperator might be better.  

If you do use a submenu it would be a good idea to provide other Zoom levels,
possibly even an option to zoom to arbitrary sizes 
(See how mozilla does it for a good example).  

it is a good idea to use the labels
_Zoom
   _Zoom In
   Zoom _Out

because that way people who are using keyboard excellarators can Zoom in simply
by pressing Alt+Z+Z  
(notice how mozilla and gedit use the same trick for _Edit, Pr_eferences, it is
not just a coincidence there is some real user interface knowledge behind it)
Comment 2 Calum Benson 2004-10-21 15:47:32 UTC
Would zooming in affect only the font size in the window, or the font size of
the printout too?  For accessibility, it's useful to keep them independent-- low
vision users might want to edit a document but print it out for a colleague with
"normal" eyesight, and equally a person who is comfortable with the default
screen font size might want to print out a document in large print format for a
low-vision colleague.

(I suppose the printing side of things is really something to take up with the
gnome-print folks, though-- printout size ought to be scalable from any app,
within reason, not just gedit).
Comment 3 Calum Benson 2004-10-21 16:50:25 UTC
Apologies for spam-- ensuring Sun a11y team are cc'ed on all current a11y bugs.
 Filter on "SUN A11Y SPAM" to ignore.
Comment 4 Muthiah Annamalai 2005-06-13 03:31:01 UTC
Im starting work on this.
Comment 5 Paolo Maggi 2005-06-13 08:44:41 UTC
Muthiah: please, write this plugin using the new plugin system. See 
http://live.gnome.org/Gedit_2fNewMdi for more info or contact me on
irc.gnome.org (#gedit channel)
Comment 6 Loïc Minier 2005-12-18 18:01:14 UTC
(This is Debian bug http://bugs.debian.org/342808.)
Comment 7 Mathieu Pillard 2006-03-04 04:02:23 UTC
Mutiash, did you make any progress? It's been a while :) If you are not actively working on this I'll take a look.
Comment 8 Paolo Maggi 2006-03-04 18:35:44 UTC
Fomr debian bug report:

"Gedit appears to have no means of zooming text size. It would be very 
helpful to be able to zoom text size particularly with the standard 
CTRL+MOUSE WHEEL used by Firefox and OpenOffice.Org."

---------------

We are moving all the request for plugins that we don't plan to add to gedit
itself on http://live.gnome.org/Gedit.

Closing as WONTFIX.
Comment 9 timmichelsen 2007-07-23 12:43:59 UTC
Hello,
I want to know whether there's been any progress in coding such a zooming plug-in.

See also:
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/117823
Comment 10 Konstantin Mikhaylov 2008-06-22 14:29:28 UTC
Created attachment 113202 [details]
Plugin to zoom in / zoom out text in gedit

Can somebody help me to test this plugin? If everyting will work fine than we can make public release.
Comment 11 timmichelsen 2008-06-24 14:29:43 UTC
@ Konstantin Mikhaylov
Thanks for your effort to write this plugin.

It works for me only with using the menu.
CTRL++/- doesn't work. Also CTRL+Mouswheel doesn't work.
Comment 12 Konstantin Mikhaylov 2008-06-25 02:08:42 UTC
@ timmichelsen@gmx-topmail.de

Does this plugin increase/decreas font size independently in different tabs and windows?
Try to use Plus/Minus keys from numpad. Do this keys work?
Comment 13 Steve Frécinaux 2008-06-25 07:41:58 UTC
(In reply to comment #12)
Konstantin, please do not use plain text e-mails in bug comments: this bugzilla is publicly accessible (but emails should not be displayed when not logged in).
Comment 14 Wouter Bolsterlee (uws) 2009-01-15 20:47:09 UTC
A while back I've taken the code from comment #10 and worked on it a bit. I've put up a Bazaar branch with my code here, so that it doesn't get lost:

  https://code.launchpad.net/~uws/+junk/gedit-plugin-text-size

The (mostly not too interesting) changes for now:
 1: Import initial version from bug 152730
 2: Add useful description
 3: Add myself to authors and copyright
 4: Don't use extra directory for actual plugin code
 5: Normalize some whitespace (no code changes)
 6: Improve UI strings
 7: Update action names accordingly
 8: Renamed plugin "Text size" and files to "textsize"
 9: Renamed remaining "FontResizer" left-overs (class names etc)
10: Use clean string formatting instead of ugly __str__() magic
Comment 15 MrPok 2010-01-07 18:18:50 UTC
I have tested both the plugin from com#10 as well as com#14. Nice to have this, since my eyes sometimes get tired from all the focussing.. :D
 
I can confirm that the text is resized with the <+> and <-> keys on the numpad, but *not* in combination with the <+><-> next to the <backspace>. 

For both plugins though, the <ctrl>+<0> does *not* work in any way. Therefore, at the moment the only way to reset the font size to normal is via the View menu.

It would also be great addition if the plugin could be configured to resize all opened tabs instead of only the focussed one.
Comment 16 sebn 2010-04-14 20:04:16 UTC
Just downloaded files from Wouter's branch.

Accelerators are defined using the keypad, not the normal +/-/0 keys.

Replacing accelerators in the *.py file with the following works for me:
<Control>plus
<Control>minus
<Control>0

I suppose I could even have used the existing API instead of hardcoded names:
gtk.accelerator_name(ord('+'), gtk.gdk.CONTROL_MASK)
gtk.accelerator_name(ord('-'), gtk.gdk.CONTROL_MASK)
gtk.accelerator_name(ord('0'), gtk.gdk.CONTROL_MASK)
Comment 17 jessevdk@gmail.com 2010-05-01 20:30:01 UTC
We have taken the basic plugin and started modifying it for inclusion in gedit-plugins. The code at the moment can be found at http://github.com/nacho/gedit-text-size. We have cleaned up the code, and added the following features:

* Improved modifying font sizes without going through font string representations
* Improved resetting to default text sizes
* Zooming with the mouse scroll wheel (and resetting with Ctrl+middle click)
* Automatic and dynamic binding/rebinding of keypad +/-/0 accelerators
* Per selection zoom

One issue is the copyright of the original files. There was no GPL license present in the original code, and thus we cannot really include it without having the permission of the original authors to release it under GPL. Konstantin/Wouter can you let us know if we can release the code under GPL?
Comment 18 Wouter Bolsterlee (uws) 2010-05-02 09:32:43 UTC
Jesse, feel free to (re)license my modest contributions under the GPL.
Comment 19 jessevdk@gmail.com 2010-05-06 10:02:30 UTC
This plugin (the modified version) has now been included in gedit-plugins.
Comment 20 MrPok 2010-05-10 11:36:41 UTC
Nice effort! I am eager to try it out, does anyone have any idea when this latest version of the package will be available through Ubuntu synaptic? I already saw it on the ftp server via live.gnome.org, but I am not too handy with make files..

I would also like to point out that the list of plugins on http://live.gnome.org/Gedit/Plugins is not update yet.