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 105292 - pango_[ft2|win32|x]_layout_render() ignores spacing
pango_[ft2|win32|x]_layout_render() ignores spacing
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.2.x
Other All
: Normal normal
: 1.2.2
Assigned To: Owen Taylor
Owen Taylor
Depends on:
Blocks:
 
 
Reported: 2003-02-05 11:49 UTC by Sven Neumann
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes the problem -- tested for PangoFT2 (3.43 KB, patch)
2003-02-05 11:50 UTC, Sven Neumann
none Details | Review
proposed patch for pangoft2 (2.84 KB, patch)
2003-02-05 22:49 UTC, Sven Neumann
none Details | Review
Updated patch that fixes the X and Win32 backends as well (both untested) (8.39 KB, patch)
2003-04-02 15:27 UTC, Sven Neumann
none Details | Review

Description Sven Neumann 2003-02-05 11:49:34 UTC
It seems that all rendering backends (Xft as well??) ignore the spacing
attribute of the PangoLayout. The layout itself calculates its extents with
line spacing but the rendering routines fail to add spacing when they
calculcate the y_offset for rendering. I'll attach a patch against pango-1-2.
Comment 1 Sven Neumann 2003-02-05 11:50:44 UTC
Created attachment 14120 [details] [review]
Patch that fixes the problem -- tested for PangoFT2
Comment 2 Owen Taylor 2003-02-05 15:11:46 UTC
The right fix is really to switch all the rendering routines
to use PangoLayoutIter, like gdk_draw_pango_layout() does,
so this information is encapsulated.
Comment 3 Sven Neumann 2003-02-05 22:17:03 UTC
I agree. Do you want me to come up with a patch that fixes it that way?
Comment 4 Sven Neumann 2003-02-05 22:49:40 UTC
Created attachment 14142 [details] [review]
proposed patch for pangoft2
Comment 5 Sven Neumann 2003-02-05 22:53:44 UTC
I've attached a new patch that seems to work fine. I have tested it
using the GIMP's text tool. If you give your OK, I'll try to do
similar patches for the other backends. BTW, is there a corresponding
PangoXft function as well?
Comment 6 Sven Neumann 2003-03-11 11:04:12 UTC
Owen, do you want me to prepare patches for the other backends? It
would be nice to get this fixed soon (at least for PangoFT2) since
GIMP-1.3 depends on it and people start to complain...
Comment 7 Sven Neumann 2003-03-28 01:37:56 UTC
Setting the milestone to the next release in order to assure that this
patch is not forgotten.
Comment 8 Sven Neumann 2003-04-02 15:27:18 UTC
Created attachment 15392 [details] [review]
Updated patch that fixes the X and Win32 backends as well (both untested)
Comment 9 Owen Taylor 2003-04-02 17:46:43 UTC
As far as this patch goes, it looks good to me. You
can go ahead and apply it to pango-1-2 and HEAD.

draw_layout_line() is still a bit of a problem ...
if you compare the GDK function the the functions
in Pango, you'll see that the Pango functions
don't handle rise, strikethrough, or imposed
shape. And there is a lot of duplicated code. We
should leave a bug open to try and do something
about that.

That is probably closely related to bug 107668.
Comment 10 Sven Neumann 2003-04-02 18:26:52 UTC
Applied to both branches:

2003-04-02  Sven Neumann  <sven@gimp.org>

  * pango/pangoft2.c (pango_ft2_render_layout)
  * pango/pangowin32.c (pango_win32_render_layout)
  * pango/pangox.c (pango_x_render_layout): use a PangoLayoutIter to
  iterate over the lines and let render_layout_line() do the actual
  rendering. Fixes bug #105292.

Do you want me to open a new report for the remaining issues?