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 345926 - pdb text functions disregards type_size parameter (pixels / points)
pdb text functions disregards type_size parameter (pixels / points)
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: libgimp
git master
Other All
: Normal minor
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2006-06-26 03:05 UTC by Joao S. O. Bueno
Modified: 2006-06-28 06:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch - takes size_type "GIMP_POINTS" in consideration when rendering text. (1.36 KB, patch)
2006-06-26 03:06 UTC, Joao S. O. Bueno
none Details | Review
fixed patch (12.81 KB, patch)
2006-06-26 16:40 UTC, Sven Neumann
rejected Details | Review
Patch to pdb documentation (13.31 KB, patch)
2006-06-28 04:37 UTC, Joao S. O. Bueno
committed Details | Review

Description Joao S. O. Bueno 2006-06-26 03:05:10 UTC
gimp-text-font-name and friends have a size_type parameter which should specify  if the given font size is in pixels or in points.

It is not even used in current code.

I made a patch for gimp-text-font-name to create a pixel size for the point given the image's current resolution.

for the *get-extent-fontname function, a point size has no meaning since it does not have an image or resolution upon which to calculate the pixel size of the generated layer.
Comment 1 Joao S. O. Bueno 2006-06-26 03:06:37 UTC
Created attachment 68001 [details] [review]
patch - takes size_type "GIMP_POINTS" in consideration when rendering text.
Comment 2 Sven Neumann 2006-06-26 16:40:40 UTC
Created attachment 68038 [details] [review]
fixed patch

This patch fixes an issue with the attached patch (variable declaration in the middle of a code block). It also completely untabbifies the file.
Comment 3 Sven Neumann 2006-06-26 16:42:11 UTC
I am not sure if we are doing us and our users a favor if we do this change. I would rather suggest that we fix the documentation and state that the size-type parameter is ignored. Otherwise we end up with an API where the parameter is respected for one call and ignored for other calls.
Comment 4 Joao S. O. Bueno 2006-06-26 17:47:35 UTC
All right for me.
Do you think the simple calculation I made in the patch can be put inline in the documentation? That would make life easier for script-writers.


Comment 5 Sven Neumann 2006-06-27 13:10:46 UTC
Please submit a patch for the documentation so that I can review and apply it.
Comment 6 Joao S. O. Bueno 2006-06-28 04:37:44 UTC
Created attachment 68103 [details] [review]
Patch to pdb documentation

Patch untabifies file and updates comments on *-fontname functions.
Comment 7 Sven Neumann 2006-06-28 06:35:31 UTC
2006-06-28  Sven Neumann  <sven@gimp.org>

	* tools/pdbgen/pdb/text_tool.pdb: applied a (slightly modified)
	patch from Joao that improves PDB documentation (bug #345926).

	* app/pdb/text_tool_cmds.c
	* libgimp/gimptexttool_pdb.c: regenerated.