text tool for 2.6 (or any later versions)
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.
text tool for 2.6 (or any later versions) | Marcus Heese | 07 Nov 17:29 |
text tool for 2.6 (or any later versions) | Alexandre Prokoudine | 07 Nov 17:58 |
text tool for 2.6 (or any later versions) | Marcus Heese | 07 Nov 18:42 |
text tool for 2.6 (or any later versions) | Sven Neumann | 07 Nov 19:59 |
text tool for 2.6 (or any later versions) | Sven Neumann | 08 Nov 10:58 |
text tool for 2.6 (or any later versions)
Hi,
I've made a little research about typography in the last week because everybody on the list was talking about this "this time we get it right"-thing. And here are the problems I see and some suggestions to it:
First of all (although perhaps the least important), it would be good to
have a well-designed font selection dialog, that allows a quick
selection of a font even when you have a lot of fonts installed and
you're perhaps searching for a specific font face and you don't know the
name of a specific font that fulfills your needs.
A little googling then pointed me to that site:
http://www.unifont.org/fontdialog/
I clearly see the problem that a well-designed font-dialog is a task
that should be implemented in the toolkit, so gtk+ in our case, but I
think it's important to point out that this is a thing which is really
annoying when using the gimp (well, at least it is annoying me for a
long time, because one doesn't really have to look for artistic fonts
when simply writing a letter or something with a word processor).
About justification and writing direction: I've used some Asian fonts in one of my last gimp works... and then I couldn't believe that this seems to be a problem, too. I'm still thinking it is my fault not finding the options for it :) (perhaps it's some localization specific setting or something) ... Where can I set the writing direction (from right to left, left to right, top to bottom, bottom to top, etc.)?? and what would justification like left justified mean for a box that has a writing direction from top to bottom?
Ok, but now more to the Western font problems. The so-called "tracking" is implemented with the letter-spacing mechanism. There is, however, no option to disable/enable the so-called "kerning" of a font. It's not always desirable to have kerning enabled, and at the moment I helped myself in just using tracking for this, although it's definitely NOT giving the exact result I wanted to have. So another option for enabling/disabling kerning of a font would be nice, too. And I don't know, perhaps FreeType has an auto-kerning mechanism, too, like they have for hinting (the auto-hinter).
Another really nice feature would be, if one could activate ligature substitutions! So if I type the German words "finden" or "fliegen" the ligatures "fi" and "fl" would automatically be substituted with the appropriate unicode sign for these ligatures. Another good example is always the "ff" ligature... like in the German word "hoffen". I don't like the idea that ligatures are always substituted because sometimes the ligature signs don't have hinting information (and then one would be forced to use FreeType's autohinter) and furthermore it is not always desirable to get the ligatures substituted (because you don't like them or what ever).
Another thing. If one changes the font size, it would be desirable to have the immediate informations about the "cap height", the "ascent", the "descent", the "x-height" and the "accent height" for the font according to the font size. These are no informations which can be changed (of course), but sometimes I'd like to have the possibility to see the effective x-height for a font with 10 pixels, because perhaps I want to have an x-height of 6 pixels and I don't really care about the real font size anyway.
For the PDB api, it would be necessary to do some additional functions which calculate the extents of the text (with all options possibly to be enabled/disabled which could change the extents), the extents of the whole text-box (text-layer in fact), and perhaps some functions which could calculate positions: starting position, which can be different from the text-box position, and the position at every offset in the text... for example one could get the position of the second word in "Der Übergang", add to it the "cap height" of the font, and one would get the position directly above the "U" and underneath the accent.
So far my comments on the current text tool.
best regards Marcus
text tool for 2.6 (or any later versions)
On Nov 7, 2007 7:29 PM, Marcus Heese wrote:
Ok, but now more to the Western font problems. The so-called "tracking" is implemented with the letter-spacing mechanism.
This is incorrect. Kerning adjusts kern pairs, tracking adjusts space between words. Letter spacing in GIMP is a simple solution to make kerning possible at all, not tracking. More versatile features like kerning individual kern pairs and tracking will probably require on-canvas text editing.
Alexandre
text tool for 2.6 (or any later versions)
Alexandre Prokoudine schrieb:
On Nov 7, 2007 7:29 PM, Marcus Heese wrote:
Ok, but now more to the Western font problems. The so-called "tracking" is implemented with the letter-spacing mechanism.
This is incorrect. Kerning adjusts kern pairs,
Yup... that's right!
tracking adjusts space
between words.
No. Tracking (=letter-spacing) adjusts the overall spacing of a word!
Letter spacing in GIMP is a simple solution to make kerning possible at all, not tracking. More versatile features like kerning individual kern pairs and tracking will probably require on-canvas text editing.
Ok, perhaps we have some conflicts in our defintions. However, I don't know the gimp internals, so I guess you're right ;)
Anyway, that still leaves the problem of a missing (or wrong) implementation of kerning and tracking.
regards Marcus
text tool for 2.6 (or any later versions)
Hi,
On Wed, 2007-11-07 at 17:29 +0100, Marcus Heese wrote:
First of all (although perhaps the least important), it would be good to have a well-designed font selection dialog, that allows a quick selection of a font even when you have a lot of fonts installed and you're perhaps searching for a specific font face and you don't know the name of a specific font that fulfills your needs. A little googling then pointed me to that site: http://www.unifont.org/fontdialog/
That document is not quite up to date. GIMP 2.4 does take the major coverage of a font into account and displays a specific string in the preview instead of always using "Aa". This could probably be improved further but I don't like the "solution" that this document suggests. Using the name of the font for previewing the font is a very bad idea. You can't compare fonts any longer and some fonts do not even cover the glyphs that are needed to write their own name.
I clearly see the problem that a well-designed font-dialog is a task that should be implemented in the toolkit, so gtk+ in our case, but I think it's important to point out that this is a thing which is really annoying when using the gimp (well, at least it is annoying me for a long time, because one doesn't really have to look for artistic fonts when simply writing a letter or something with a word processor).
GTK+ has a font selection dialog, we just don't use it as it doesn't seem to fit well into the application.
About justification and writing direction: I've used some Asian fonts in one of my last gimp works... and then I couldn't believe that this seems to be a problem, too. I'm still thinking it is my fault not finding the options for it :) (perhaps it's some localization specific setting or something) ... Where can I set the writing direction (from right to left, left to right, top to bottom, bottom to top, etc.)?? and what would justification like left justified mean for a box that has a writing direction from top to bottom?
Right-to-left writing is supported. top-to-bottom has only recently been added to Pango and some changes in GIMP are needed to make this feature available.
Ok, but now more to the Western font problems. The so-called "tracking" is implemented with the letter-spacing mechanism. There is, however, no option to disable/enable the so-called "kerning" of a font. It's not always desirable to have kerning enabled, and at the moment I helped myself in just using tracking for this, although it's definitely NOT giving the exact result I wanted to have. So another option for enabling/disabling kerning of a font would be nice, too.
Pango doesn't offer this choice, so GIMP cannot offer it either. So if you wanted to fix this, you should start by adding this feature to Pango.
Another really nice feature would be, if one could activate ligature substitutions!
Same here. You should get in contact with Behdad and propose this feature to him.
Sven
text tool for 2.6 (or any later versions)
Hi,
since you seem to be interested in the text tool and how to improve it, here are some small steps that I would suggest you (or anyone else) starts with:
Finish work on the text box.
The text tool was always supposed to allow the user to create a rectangular text box so that the text flows into it. This was never finished, but the code for this is almost there. It mainly just needs a user interface and with the new rectangle tool code, this shouldn't be too hard.
Allow text transformations.
When a text layer undergoes a linear transformation, currently the pixels are transformed and the text information is discarded. This could easily be changed. There already is code to apply linear transformations to text layers and to store the transformation with the text layer. It would be nice to get this finished.
Evaluate porting to PangoCairo
Currently we are using the Freetype2 backend of Pango. It would be nice if we could switch to the Cairo backend. This would allow to use the same backend for rendering the layer as we would use if we added in-place editing. So this would be a first step towards in-place text editing. I haven't looked at this in detail yet so I can't tell if this would be a simple change or not.
Sven