[Bug 728636] textoverlay: cuts off right edge italicised text
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sun Mar 29 07:34:52 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=728636
Tim-Philipp Müller <t.i.m at zen.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #299943|none |reviewed
status| |
--- Comment #8 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 299943
--> https://bugzilla.gnome.org/attachment.cgi?id=299943
fix bounding box
>The maximum inked extent is
>the width of the inked extent plus the offset it starts at.
>
>It's possible that negative offsets would require further adjustment
>to the calculation, if a test case is found.
>
>- width = (logical_rect.width + overlay->shadow_offset) * scalef;
>+ width =
>+ (int) ceil ((ink_rect.width + ink_rect.x +
>+ overlay->shadow_offset) * scalef);
I think you're onto something here. I agree that we should be looking at the
ink rectangle not the logical rectangle to calculate the render surface
width/height in pixels.
However, I'm not sure about the + ink_rect.x (which is what you hinted at in
your commit message too I believe?)
Take this example here for instance:
https://mail.gnome.org/archives/gtk-devel-list/2001-August/msg00325.html
where x is negative. I wonder if we should just take ink_rect.width and ignore
ink_rect.x ?
I think in case of right-to-left text x may also be larger than the rectangle
width or just below the width, in which case one may want to handle it
differently again to get the actual dimensions (if one was to take it into
account), but you'd think the point of 'width' would be to provide the full
width of the ink rectangle.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list