On-canvas text-editing GSoC project - report
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
On-canvas text-editing GSoC project - report | Daniel Eddeland | 19 Aug 21:57 |
On-canvas text-editing GSoC project - report | David Gowers | 20 Aug 01:51 |
On-canvas text-editing GSoC project - report | gg@catking.net | 19 Aug 00:50 |
On-canvas text-editing GSoC project - report | Alexandre Prokoudine | 20 Aug 13:10 |
On-canvas text-editing GSoC project - report | Daniel Eddeland | 21 Aug 23:25 |
On-canvas text-editing GSoC project - report
On Wed, 20 Aug 2008 01:51:35 +0200, David Gowers wrote:
The UI team seem to think variation in right-click menu is confusing, but IMO several tools would benefit from it (for example, when you're painting fullscreen, you might want to change the FG color without needing to exit fullscreen to use one of the dockables.)
On-canvas text-editing GSoC project - report
Google Summer of Code Project: Improve the text-tool in GIMP
By Daniel Eddeland (Skalle)
In Gimp 2.4 and earlier versions, the text tool uses an external editor window, which is inconvenient in several ways. The aim of my project was to support on-canvas text editing, so that the user would be able to act directly on the image, instead of using a separate window. The code has been placed in a special SVN branch, called "soc-2008-text", which anybody who has SVN access can download and build.
What have I done?
*The first thing I did was to port the text-core in gimp to use
PangoCairo functions instead of Freetype2. This port will be helpful
for some work in the future which will make the text-tool faster.
*After porting I started working on "on-canvas text editing". That
means you'll be able to type, delete, copy and paste text on-canvas
instead of using the text-dialog. I have added settings to tools to
give them the ability to grab the keyboard input (which is obviously
needed if you want to type). With these settings the tool can block
the input from the rest of the interface, so that typing a "P" will
add a "P" to the current text object instead of switching to GIMP's
pencil tool. Input is possible typing normally on a regular keyboard,
but also using alternate input methods like SCIM.
*I have added a text-cursor, mouse-actions and graphical feedback for
text-selections, so the text-tool would feel as ergonomic as possible
like other text applications.
*I have added a context-sensitive menu which appears when you
right-click on the text-area. It has options such as copy/cut/paste
and changing input methods.
*I have also helped fixing some minor bugs not directly related to
on-canvas editing.
What still needs to be done:
The code is already usable. For large images or large text layers, there may sometimes be annoying delays between typing and the appearance of the text in the image. It would be nice to have some sort of fast preview. Doing this properly would require changes in the way Gimp displays an image, though. (Technically, it requires implementing non-xor drawing for tools.)
There are still some bugs related to what I have done during GSoC: some of these haven't been done because they're low priority and there hasn't been time yet, some of them haven't been done because there are decisions about program design that hasn't been made yet. As for other features in the text tool; I have not done anything not written in this report (unless I've forgotten something). I do think that having several text-styles per text-object would be a nice feature though. That is: you would be able to make part of your text blue, while another part of it could be another font, size or color (or all of them). I want to be able to work on this in the future if my spare time allows it, and during the summer I have done changes to the text-tool and learnt more about datatypes that will help making this a reality.
Note: In the trunk version of Gimp, when you right-click in an image, you get a version of the same menu you see in the menubar on top of the image. We decided that it is necessary for the text tool to have a "context menu" instead -- a special menu holding text-related commands. As the code works now, the context menu pops up if you right-click over the text layer. Right-clicking elsewhere gives you the image menu. The infrastructure I created to support this could in principle be used to give context menus to other tools as well.
When will you get to see how it works?
If all goes as planned, on-canvas editing will not be available in GIMP 2.6, but in GIMP 2.7. The 2.6 is drawing nearer and there are still some things that should be done and discussed about the text editing, and on top of that some bug testing. I hope this report gives you enough information, along with the pictures linked below, to be able to wait until the actual release. If you have knowledge of svn you can try the not-yet-totally-stable Gsoc-2008-text branch to try it yourself.
Picture links:
http://uploaded.joskar.com/skalle/textdemo0c.png
http://uploaded.joskar.com/skalle/textdemo1c.png
http://uploaded.joskar.com/skalle/textdemo2c.png
http://uploaded.joskar.com/skalle/textdemo3c.png
(The color is different in two of the pictures because I used another program for image capture)
To finish off I would like to thank my mentor bill Skaggs who has helped me alot, been available all the time, and put a lot of time into this. I would also like to thank the rest of the GIMP developers who have helped me with various things, and I'd like to thank Google for sponsoring.
On-canvas text-editing GSoC project - report
Hello,
On Wed, Aug 20, 2008 at 5:27 AM, Daniel Eddeland wrote:
Google Summer of Code Project: Improve the text-tool in GIMP
By Daniel Eddeland (Skalle)
In Gimp 2.4 and earlier versions, the text tool uses an external editor window, which is inconvenient in several ways. The aim of my project was to support on-canvas text editing, so that the user would be able to act directly on the image, instead of using a separate window. The code has been placed in a special SVN branch, called "soc-2008-text", which anybody who has SVN access can download and build.
What have I done?
*The first thing I did was to port the text-core in gimp to use PangoCairo functions instead of Freetype2. This port will be helpful for some work in the future which will make the text-tool faster. *After porting I started working on "on-canvas text editing". That means you'll be able to type, delete, copy and paste text on-canvas instead of using the text-dialog. I have added settings to tools to give them the ability to grab the keyboard input (which is obviously needed if you want to type).
With these settings the tool can block the input from the rest of the interface, so that typing a "P" will add a "P" to the current text object instead of switching to GIMP's pencil tool. Input is possible typing normally on a regular keyboard,
I am really impressed with that...
but also using alternate input methods like SCIM. *I have added a text-cursor, mouse-actions and graphical feedback for text-selections, so the text-tool would feel as ergonomic as possible like other text applications.
*I have added a context-sensitive menu which appears when you right-click on the text-area. It has options such as copy/cut/paste and changing input methods.
And this.
GIMP really needs more time put into UI infrastructure such as this.
The UI team seem to think variation in right-click menu is confusing, but IMO several tools would benefit from it (for example, when you're painting fullscreen, you might want to change the FG color without needing to exit fullscreen to use one of the dockables.) and we do not have any alternatives currently -- some of the HUD-style propositions on gimp-brainstorm.blogspot.com look good, but will require much more extensive use of Cairo by GIMP than there currently is.
"Skalle"? Are you the same "Skalle" that I ('neota') once did a CPC
pixel art collab/exchange with ?
(ie. same person as
http://www.wayofthepixel.net/pixelation/index.php?PHPSESSID=7ab74a703bfc3ae3032d9d6d3f16e69f&topic=514.msg6714#msg6714?)
David
On-canvas text-editing GSoC project - report
On Tue, Aug 19, 2008 at 11:57 PM, Daniel Eddeland wrote:
*I have added a text-cursor, mouse-actions and graphical feedback for text-selections, so the text-tool would feel as ergonomic as possible like other text applications.
From what I remember about a 1,5 weeks old SVN checkout. Ctrl+A didn't
work for selecting all text and Ctrl+Shift+Arrows for selecting whole words didn't work either. Is it already fixed or on radar?
Alexandre
On-canvas text-editing GSoC project - report
On Wed, Aug 20, 2008 at 1:10 PM, Alexandre Prokoudine < alexandre.prokoudine@gmail.com> wrote:
On Tue, Aug 19, 2008 at 11:57 PM, Daniel Eddeland wrote:
*I have added a text-cursor, mouse-actions and graphical feedback for text-selections, so the text-tool would feel as ergonomic as possible like other text applications.
From what I remember about a 1,5 weeks old SVN checkout. Ctrl+A didn't
work for selecting all text and Ctrl+Shift+Arrows for selecting whole words didn't work either. Is it already fixed or on radar?
Alexandre