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 392475 - Text extent not proportional to resolution
Text extent not proportional to resolution
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: High normal
: ---
Assigned To: pango-maint
pango-maint
: 410420 (view as bug list)
Depends on:
Blocks: 377795
 
 
Reported: 2007-01-03 21:00 UTC by Emmanuel Pacaud
Modified: 2007-02-23 04:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test code (1.34 KB, text/x-csrc)
2007-01-03 21:01 UTC, Emmanuel Pacaud
Details

Description Emmanuel Pacaud 2007-01-03 21:00:19 UTC
It looks like extent of a text is not linearly proportional to resolution set by pango_cairo_context_set_resolution, which I understand perfectly for hinted fonts.

But it looks like it's also the case for unhinted style, unhinted metrics.

Is this the expected behaviour ?
Comment 1 Emmanuel Pacaud 2007-01-03 21:01:52 UTC
Created attachment 79318 [details]
test code

I'm expecting a different width/height for each resolution. But here's the output:

50 ; 25088 ; 4967
51 ; 25088 ; 5066
52 ; 25072 ; 5165
53 ; 25072 ; 5265
54 ; 31392 ; 5364
55 ; 31376 ; 5463
56 ; 31376 ; 5563
57 ; 31376 ; 5662
58 ; 31360 ; 5761
59 ; 31360 ; 5861
60 ; 31360 ; 5960
61 ; 31344 ; 6059
62 ; 31344 ; 6159
63 ; 31344 ; 6258
64 ; 31344 ; 6357
65 ; 31328 ; 6457
66 ; 37664 ; 6556
67 ; 37664 ; 6655
68 ; 37648 ; 6755
69 ; 37648 ; 6854
70 ; 37648 ; 6953
71 ; 37632 ; 7053
72 ; 37632 ; 7152
73 ; 37632 ; 7251
74 ; 37616 ; 7351
75 ; 37616 ; 7450
76 ; 37616 ; 7549
77 ; 37600 ; 7649
78 ; 43872 ; 7748
79 ; 43872 ; 7847
80 ; 43872 ; 7947
81 ; 43856 ; 8046
82 ; 43856 ; 8145
83 ; 43856 ; 8245
84 ; 43840 ; 8344
85 ; 43840 ; 8443
86 ; 43840 ; 8543
87 ; 43824 ; 8642
88 ; 43824 ; 8741
89 ; 43824 ; 8841
90 ; 50144 ; 8940
91 ; 50144 ; 9039
92 ; 50144 ; 9139
93 ; 50128 ; 9238
94 ; 50128 ; 9337
95 ; 50128 ; 9437
96 ; 50112 ; 9536
97 ; 50112 ; 9635
98 ; 50112 ; 9735
99 ; 50112 ; 9834
Comment 2 Behdad Esfahbod 2007-01-16 21:46:58 UTC
FWIW, I reproduced this.  Seems like even with hinted metrics off, glyph widthes are being rounded to whole pixels.  Got to debug it down in cairo.
Comment 3 Behdad Esfahbod 2007-01-16 21:48:36 UTC
Sorry for the noise.
Comment 4 Behdad Esfahbod 2007-02-23 04:20:09 UTC
Ok, just committed and pushed to cairo:

3b168e45510e02caf54e4b3cd0df76df6420d304

This brought down the variance of x_advance in the attached test case
for a 10pt font from 50dpi to 200dpi from 12% down to less than 0.2%.  I
think that is as good as we can get with Pango's 22.10 fixed point.

Really good to see this bug finally pinned down and fixed.  Thanks Damon
for tracking it down.
Comment 5 Behdad Esfahbod 2007-02-23 04:38:38 UTC
*** Bug 410420 has been marked as a duplicate of this bug. ***