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 123602 - PangoFT2FontMap doesn't initialize resolution
PangoFT2FontMap doesn't initialize resolution
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal normal
: 1.2.5
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2003-10-01 01:14 UTC by Sven Neumann
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed fix (1.68 KB, patch)
2003-10-01 01:16 UTC, Sven Neumann
none Details | Review

Description Sven Neumann 2003-10-01 01:14:25 UTC
The PangoFT2FontMap object doesn't initialize it's resolution and leaves it
up to the user of the library to do that. If it is omitted, the
uninitialized values for dpi_x and dpi_y are used leading to inpredictable
results. IMO the resolution should be set to a sane default, for example
72.0 dpi.
Comment 1 Sven Neumann 2003-10-01 01:16:13 UTC
Created attachment 20396 [details] [review]
proposed fix
Comment 2 Sven Neumann 2003-10-18 22:46:27 UTC
This seems like an obvious bug with a straight-forward fix. Any
reasons I should not commit this to HEAD (and probably 1.2 branch as
well) ?
Comment 3 Noah Levitt 2003-11-20 06:16:16 UTC
It looks like this change was accidentally applied on Nov 18 with a
changelog entry corresponding to bug 101856. Should figure out how to
clean that up (maybe do nothing??). Is there any point discussing
72dpi vs some other value?
Comment 4 Sven Neumann 2003-11-20 11:28:53 UTC
Damned, I committed the wrong file. So actually the fix for bug 101856
wasn't committed and this change was committed instead. I will fix
this immidiately.
Comment 5 Sven Neumann 2003-11-20 11:33:43 UTC
2003-11-20  Sven Neumann  <sven@gimp.org>

	* pango/pangoft2-fontmap.c: reverted the patch for bug #123602
	since I only applied it accidentally. I still believe the patch
	should go in though.

	* pango/pangoft2.c: really applied the fix for #101856 as
	described below.
Comment 6 Sven Neumann 2003-11-20 11:45:57 UTC
So, we are now back to the state where it should be discussed if the
patch can be applied as is and if it should go into the 1.2 branch as
well. Since there's a chance that uninitialized values are used, I
think it should go into both branches. The only thing that might need
discussion is the default value. Although 72 dpi doesn't fit today's
monitor resolutions very well, it is the typical default value for
resolutions since it makes makes points sizes be equal to pixels sizes.
Comment 7 Owen Taylor 2003-12-05 15:28:17 UTC
Should be fine, with the dpi of 72, for both pango-1-2 and HAED
Comment 8 Sven Neumann 2003-12-05 16:07:06 UTC
The code is quite different between both branches but I am confident
that I did the right thing (TM) this time...

2003-12-05  Sven Neumann  <sven@gimp.org>

    * pango/pangoft2-fontmap.c: initialize the fontmap's resolution 
    to some sane default values. Fixes bug #123602.

2003-12-05  Sven Neumann  <sven@gimp.org>

    * pango/pangoft2-fontmap.c (pango_ft2_font_map_new): merged fix
    for bug #123602 from HEAD branch (initialize fontmap resolution).