Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix text scale and enable glyph position rounding again #8429

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Nefsen402
Copy link
Member

Fixes: #8421

Comment on lines +177 to +186
cairo_set_antialias(c, CAIRO_ANTIALIAS_BEST);
for (int i = 0; i < root->outputs->length; ++i) {
struct sway_output *output = root->outputs->items[i];
if (!output->wlr_output->enabled) {
continue;
}

int size, baseline;
get_text_size(c, config->font_description, &size, NULL,
&baseline, output->wlr_output->scale, props->pango_markup, "%s", buffer->text);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it would be fine to just take the largest scale from all outputs.

get_text_size is quite expensive - a quick test on my Ryzen laptop on battery power clocks get_text_size with a random title around 400µs, although it gets a lot faster on external power of course.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Bad quality non anti-aliased fonts after pango change
2 participants