Skip to content

Draw truecolor icons using dual-color half blocks

Eden Bynever requested to merge edenbynever/xprop:truecolor-icons into master

The vast majority of monospaced fonts are roughly half as wide as they are tall; to account for this when displaying icons, xprop draws each pixel twice in the horizontal, which nicely evens out the proportions.

This patch utilizes the Lower Half Block character (▄) to obtain the same result in a quarter of the space. By setting both a background and a foreground color, we can draw two pixels per character cell, thereby halving the apparent height of an icon rather than doubling its width.

libre

Signed-off-by: Eden Bynever edenbynever@proton.me

Merge request reports

Loading