Skip to content

Conversation

@patrick96
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

If any rendered text uses a non-integer number of pixels (often emojis),
rendering of subsequent text blocks will start between pixels which
results in small gaps in the background and over/underline colors caused
by cairo only rendering at fractional-intensity in the beginning and end
pixel.

Simply rounding up text width can solve this.

Related Issues & Documents

Fixes #2785

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

If any rendered text uses a non-integer number of pixels (often emojis),
rendering of subsequent text blocks will start between pixels which
results in small gaps in the background and over/underline colors caused
by cairo only rendering at fractional-intensity in the beginning and end
pixel.

Simply rounding up text width can solve this.

Fixes polybar#2785
@patrick96 patrick96 marked this pull request as ready for review August 24, 2022 22:48
@codecov
Copy link

codecov bot commented Aug 24, 2022

Codecov Report

Merging #2802 (d91a3eb) into master (6ccecbf) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head d91a3eb differs from pull request most recent head ce4190f. Consider uploading reports for the commit ce4190f to get more accurate results

@@            Coverage Diff             @@
##           master    #2802      +/-   ##
==========================================
- Coverage   13.49%   13.49%   -0.01%     
==========================================
  Files         152      152              
  Lines       11416    11422       +6     
==========================================
  Hits         1541     1541              
- Misses       9875     9881       +6     
Flag Coverage Δ
unittests 13.49% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/cairo/context.hpp 0.00% <0.00%> (ø)
src/drawtypes/label.cpp 11.86% <0.00%> (-0.35%) ⬇️
include/drawtypes/label.hpp 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@patrick96 patrick96 merged commit d817080 into polybar:master Aug 24, 2022
@patrick96 patrick96 deleted the fix/2785-emoji-gap branch August 24, 2022 22:55
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.

[Bug]: Weird gap in underline between format-prefix and module when using emoji

1 participant