sideline icon indicating copy to clipboard operation
sideline copied to clipboard

Fix right align with variable width fonts

Open chuxubank opened this issue 3 months ago • 7 comments

When fixing #20 , we use current window's font width to calculate the string width, but for variable width fonts, which usually used in variable-pitch-mode, this will cause error.

Whereas emacs's built-in string-pixel-width do not respect the face remapping, which cause wrong string width when use buffer-face-mode.

This pr mixed the @gustavotcabral 's patch and emac's built-in string-pixel-width to directly get the correct string width.

This fix is not that heavy because we are doing almost the same thing as emac's built-in string-pixel-width.

Some screenshots after fix: image image

chuxubank avatar Apr 03 '24 14:04 chuxubank