GNOME Bugzilla – Bug 345926
pdb text functions disregards type_size parameter (pixels / points)
Last modified: 2006-06-28 06:35:31 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.
Created attachment 68001 [details] [review] patch - takes size_type "GIMP_POINTS" in consideration when rendering text.
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.
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.
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.
Please submit a patch for the documentation so that I can review and apply it.
Created attachment 68103 [details] [review] Patch to pdb documentation Patch untabifies file and updates comments on *-fontname functions.
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.