GNOME Bugzilla – Bug 392475
Text extent not proportional to resolution
Last modified: 2007-02-23 04:38:38 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 ?
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
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.
Sorry for the noise.
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.
*** Bug 410420 has been marked as a duplicate of this bug. ***