GNOME Bugzilla – Bug 722409
Rendering is overlapped when line is too long
Last modified: 2018-05-22 13:11:20 UTC
Originally reported at Red Hat Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1051083 The summary says it all though, "too long" means over 320K characters at a line in the reporter's case. the screenshot is attached there.
This is because Pango coordinates are in 22.10 fixed-point format. At 13 pixels a glyphy, 13 * 322639 = 4194307 overflows 2**22 = 4194304. Not sure how to fix this. How about "Don't do that"?
Aha. though I tend to agree with "Don't do that" and I'm sure it's pretty rare case to make it happen in the real use cases. that said that would be good to have a safety check to not mess it up IMHO. so if it's the limitation on current implementation at this point, how about preventing adding more characters to PangoLayout? unfortunately pango_layout_set_text() doesn't return any value and assuming it won't fail. so it may requires to change API though.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/pango/issues/228.