RSS/Atom feed Twitter
Site is read-only, email is disabled

Font Hinting in PDL

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.

4 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Font Hinting in PDL Iain Kennedy 09 Nov 12:25
4243d4c60511090536n12f2358d... 07 Oct 20:24
  Font Hinting in PDL Iain Kennedy 22 Nov 12:26
   Font Hinting in PDL Nathan Summers 22 Nov 16:12
    Font Hinting in PDL Iain Kennedy 23 Nov 20:50
Iain Kennedy
2005-11-09 12:25:23 UTC (over 18 years ago)

Font Hinting in PDL

Hello,

I'm currently working on a perl project that uses Gimp.pm (2.0) to render fonts. Using the gimp manually, I am able to turn hinting on and off (and save this option in my tool options).

When I use gimp_text_fontname() to do this in perl, it appears that font hinting is turned on by default, and there is no parameter to pass to gimp_text_fontname to disable it. The PDL call also ignores the tool options.

I'm interested in adding this functionality to the PDL call if possible, or at least figuring out how to disable hinting at some other level... are there any design considerations/pointers about this before I start rooting around in the code, or perhaps someone else is already working on the PDL call and this could be added to the wishlist?

Iain --
Technical Director, Psand.Net
Web: http://psand.net
PGP: http://psand.net/iain/

Iain Kennedy
2005-11-22 12:26:05 UTC (over 18 years ago)

Font Hinting in PDL

Thanks for the pointers, Seth.

Not sure whether I've gone about this the right way, but I've created a new function in text_tool.pdb that handles hinting and autohinting as extra arguments (by duplicating the existing text_fontname() as text_fontname_set_hinting() in text_tool.pdb and duplicating the text_render() function as text_render_set_hinting() in the app/text/gimptext-compat.h/c files).

It doesn't seem like the most elegent way of doing it, but it works for me!

I'd like to submit a patch to bugzilla of this and get some feedback, but I'm having a little trouble generating the patch file from the CVS in that I'm not sure how to clean the source before generating the patch, so that the automatically generated files are not included in the patch.

I presume it's something like 'make distclean' before I do:

cvs diff -up > /home/iain/patchfile.patch

Regards,

Iain

On Wed, 9 Nov 2005, Seth Burgess wrote:

Hi Iain,

Thanks for using Gimp-Perl!

You'll need to add source to the gimp tree for this; I suggest submitting a patch to the gimp bugzilla. Also, know that much of the PDB (not PDL, that's the Perl Data Language) is partially-generated via perl scripts as part of the build process; they're generated by /tools/pdbgen, and the resultant .c/.h files go into /app/pdb

Things that don't disturb the current API are more likely to be readily accepted, since they'll not break every script in existance; so something along the lines of "gimp_text_fontname_set_hinting" or the like might be appropriate here.

I've not looked at the code in question at all, but Sven is in charge of things font-like in general so he might be able to point you at the right code if its not obvious to you after looking for a bit.

Best Regards,

Seth Burgess seth@ghs.com
Gimp-Perl maintainer

On 11/9/05, Iain Kennedy wrote:

Hello,

I'm currently working on a perl project that uses Gimp.pm ( 2.0) to render
fonts. Using the gimp manually, I am able to turn hinting on and off (and save this option in my tool options).

When I use gimp_text_fontname() to do this in perl, it appears that font hinting is turned on by default, and there is no parameter to pass to gimp_text_fontname to disable it. The PDL call also ignores the tool options.

I'm interested in adding this functionality to the PDL call if possible, or at least figuring out how to disable hinting at some other level... are there any design considerations/pointers about this before I start rooting around in the code, or perhaps someone else is already working on the PDL call and this could be added to the wishlist?

Iain --
Technical Director, Psand.Net
Web: http://psand.net
PGP: http://psand.net/iain/

Nathan Summers
2005-11-22 16:12:05 UTC (over 18 years ago)

Font Hinting in PDL

On 11/22/05, Iain Kennedy wrote:

I'd like to submit a patch to bugzilla of this and get some feedback, but I'm having a little trouble generating the patch file from the CVS in that I'm not sure how to clean the source before generating the patch, so that the automatically generated files are not included in the patch.

You can remove the autogenerated file from the patch using a text editor. That's probably the easiest thing to do.

Rockwalrus

Iain Kennedy
2005-11-23 20:50:34 UTC (over 18 years ago)

Font Hinting in PDL

Hi,

Thanks to everybody for your input - I've submited the patch to bugzilla (Bug 322230), I've also tested it against the current stable debian source package for gimp 2.2 and produced a (patched) stable package for our production servers, as I was unable to compile the latest gimp CVS due to glib versions not being available on the stable distro.

I'm sure someone will come up with a new pdb API for the text calls at some point and make all this unnecessary, but until then, it's got me out of a sticky spot :)

Iain

On Tue, 22 Nov 2005, Nathan Summers wrote:

On 11/22/05, Iain Kennedy wrote:

I'd like to submit a patch to bugzilla of this and get some feedback, but I'm having a little trouble generating the patch file from the CVS in that I'm not sure how to clean the source before generating the patch, so that the automatically generated files are not included in the patch.

You can remove the autogenerated file from the patch using a text editor. That's probably the easiest thing to do.

Rockwalrus

--
Technical Director, Psand.Net
Tel: +44 (0)8701 624927 ext 1
Mob: +44 (0)7970 012467
Fax: +44 8701 624025
Web: http://psand.net
PGP: http://psand.net/iain/