{"action":"created","issue":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1744","repository_url":"https://api.github.com/repos/wesnoth/wesnoth","labels_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1744/labels{/name}","comments_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1744/comments","events_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1744/events","html_url":"https://github.com/wesnoth/wesnoth/issues/1744","id":232436800,"number":1744,"title":"Text rendering output bad when copied with alpha blending","user":{"login":"Vultraz","id":3558659,"avatar_url":"https://avatars3.githubusercontent.com/u/3558659?v=3","gravatar_id":"","url":"https://api.github.com/users/Vultraz","html_url":"https://github.com/Vultraz","followers_url":"https://api.github.com/users/Vultraz/followers","following_url":"https://api.github.com/users/Vultraz/following{/other_user}","gists_url":"https://api.github.com/users/Vultraz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vultraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vultraz/subscriptions","organizations_url":"https://api.github.com/users/Vultraz/orgs","repos_url":"https://api.github.com/users/Vultraz/repos","events_url":"https://api.github.com/users/Vultraz/events{/privacy}","received_events_url":"https://api.github.com/users/Vultraz/received_events","type":"User","site_admin":false},"labels":[{"id":35865188,"url":"https://api.github.com/repos/wesnoth/wesnoth/labels/bug","name":"bug","color":"fc2929","default":true},{"id":597320134,"url":"https://api.github.com/repos/wesnoth/wesnoth/labels/UI","name":"UI","color":"d455f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-31T02:37:28Z","updated_at":"2017-06-01T11:15:56Z","closed_at":null,"body":"During my work on the accelerated rendering branch, I've once again run into the issue that plagued me when I attempted to use textures for text in the GUI2 canvas along with a surface renderer: **text looks like crap if it's copied with alpha blending**:\r\n\r\n![this text looks like shit](https://cloud.githubusercontent.com/assets/3558659/26613141/0aa2f902-4605-11e7-9959-ec972deb1603.JPG)\r\n\r\nFor some reason, the text looks fine on buttons (and only buttons - in other tests before I managed to generally restrict the effect to semi-transparent surfaces).\r\n\r\nThis doesn't occur when copying the text directly to the screen renderer (`SDL_RenderCopy`) or copying the pixel data verbatim to a texture (`SDL_UpdateTexture`). However, the former conflicts with my design of having draw results cached to a texture, and the latter is impossible to use since having no blending at all cases the fully transparent area of the surface to overwrite whatever data is underneath them. The same thing occurs when disabling alpha blending (`SDL_BLENDMODE_NONE`) on either the text surface or a texture created from that surface.\r\n\r\nThis is related to #1568. The underlying cause is probably the same. This issue isn't by any means new; it's likely the reason we have the custom `blit_surface` function. I'm guessing #1568 simply covers cases it wasn't able to cover.\r\n\r\nI'm really not sure how to solve this. A stopgap measure is to call `pango_cairo_show_layout` twice, but I'm not sure that's really what we want to do.\r\n\r\nAnd for the record, no, this isn't a premultipled vs postmultipled alpha problem (at least, not entirely). Our rendering code already does a pre-to-post multiplied alpha conversion on the cairo text output."},"comment":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/comments/305463996","html_url":"https://github.com/wesnoth/wesnoth/issues/1744#issuecomment-305463996","issue_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/1744","id":305463996,"user":{"login":"Vultraz","id":3558659,"avatar_url":"https://avatars3.githubusercontent.com/u/3558659?v=3","gravatar_id":"","url":"https://api.github.com/users/Vultraz","html_url":"https://github.com/Vultraz","followers_url":"https://api.github.com/users/Vultraz/followers","following_url":"https://api.github.com/users/Vultraz/following{/other_user}","gists_url":"https://api.github.com/users/Vultraz/gists{/gist_id}","starred_url":"https://api.github.com/users/Vultraz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vultraz/subscriptions","organizations_url":"https://api.github.com/users/Vultraz/orgs","repos_url":"https://api.github.com/users/Vultraz/repos","events_url":"https://api.github.com/users/Vultraz/events{/privacy}","received_events_url":"https://api.github.com/users/Vultraz/received_events","type":"User","site_admin":false},"created_at":"2017-06-01T11:15:56Z","updated_at":"2017-06-01T11:15:56Z","body":"Not sure, but given that `blit_surface` is used on all platforms I'd say it's probably not Windows-specific."}}
{"actor":{"display_login":"Vultraz"}}