# bug 2055145: a device-space text run's clip is left unsnapped, so a fractional # clip edge cuts a whole glyph pixel row whose center lies beyond the edge, even # though the glyph is snapped to the device grid. The clip should round *out* on # the non-sub-pixel axis so the snapped glyph's own pixel rows are never shaved. # # glyph 55 of Ahem at size 20, baseline y=40, is a solid block spanning device # rows 19..44; its bottom row is [44,45) (center 44.5). The clip bottom is 44.3, # just below that center. Today (exact/unsnapped clip) row 44 is dropped; with a # round-out clip (-> 45) it is kept. Compared against the same block clipped at an # integer 45 (which keeps row 44). # # The opaque background rect keeps the picture-cache tile larger than the text's # own culling rect, so the tile coverage doesn't clip the glyph row before the # per-prim clip applies (see bug 2055145 comment: surface coverage path). root: items: - type: rect bounds: [0, 0, 200, 200] color: white - bounds: [0, 0, 80, 80] glyphs: [55] offsets: [10, 40] clip-rect: [0, 0, 60, 44.3] size: 20 color: [0, 0, 0, 1] font: "Ahem.ttf"