Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix font rendering #940

Merged

Conversation

christian-rauch
Copy link
Collaborator

@christian-rauch christian-rauch commented Jun 16, 2024

This reverts commit cba1ef2.

This fixes the font rendering issue: #940 (comment)

Fixes #939.

current master PR
pango_sd_master pango_sd_pr
pango_hello_master pango_hello_pr

@christian-rauch
Copy link
Collaborator Author

@stevenlovegrove The "continuous coords" from the commit seem to blur the rendered text (#939). What was the reason for changing this? Can this be safely reverted or are we going to introduce issues somewhere else?

@mateosss
Copy link

Thanks for the update! I can confirm this fixes #939

@stevenlovegrove
Copy link
Owner

@christian-rauch looking at the commit, it seems I made an error and should have used ProjectionMatrixOrthographic(-0.5, w-0.5, -0.5, h-0.5, -1.0, 1.0).Load(); instead of the continuous coords.

The reason for the commit was to avoid the extra glMatrixMode calls (since we have to store the projection and model view matrices and then set them in a different method

void Viewport::ActivatePixelOrthographic() const
).

Reverting is safe. We could also replace the ProjectionMatrixOrthographic call with the correct pixel centric version to avoid the two extra GL API calls.

@christian-rauch
Copy link
Collaborator Author

@christian-rauch looking at the commit, it seems I made an error and should have used ProjectionMatrixOrthographic(-0.5, w-0.5, -0.5, h-0.5, -1.0, 1.0).Load(); instead of the continuous coords.

Thanks. This seems to work. I updated the PR.

@mateosss Can you check again with the new commit in the PR?

@christian-rauch christian-rauch changed the title Revert "pango_display: less state changes in widgets" fix font rendering Jun 17, 2024
@mateosss
Copy link

Indeed this also fixes the issue, thank you both :)

@christian-rauch christian-rauch merged commit 2e67335 into stevenlovegrove:master Jun 18, 2024
12 checks passed
@christian-rauch christian-rauch deleted the fix_font_rendering branch June 18, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Font rendering issue after update
4 participants