Skip to content

Some unicode symbols are rendered unexpectedly small #1903

Closed
@echasnovski

Description

@echasnovski

As per #1071, PUA Unicode characters are rendered bigger when there is a space to the right. Most of the time it works as expected, but for some subset of Nerd Fonts characters it gives too small icons. I noticed it for characters with 'nf-md-alpha_*' classes, like 'nf-md-alpha_a' (a.k.a. "󰫮", a.k.a. f0aee).

Here is how it looks compared to similar 'nf-md-alpha-***' characters:

PUA scaling in Ghostty

pua-scaling_ghostty

Here is how it looks in Kitty and WezTerm for comparison (they look cramped mostly because my font has very small margins on top and bottom)::

PUA scaling in Kitty

pua-scaling_kitty

PUA scaling in WezTerm

pua-scaling_wezterm

And here is how it looks in st which doesn't do "render bigger if there is space to the right":

No PUA scaling in st

pua-scaling_st

So my question is is there anything reasonable to be done here?
In particular, I became more curious about this behavior mostly because st without scaling results into more readable icons than Ghostty with this type of adjustment.


Here is text used in these demos:

Demo text

󰫮 󰬈 󰯫 󰯬 󰯭
󰫯 󰬉 󰯮 󰯯 󰯰
󰫰 󰬊 󰯱 󰯲 󰯳
󰫱 󰬋 󰯴 󰯵 󰯶
󰫲 󰬌 󰯷 󰯸 󰯹
󰫳 󰬍 󰯺 󰯻 󰯼
󰫴 󰬎 󰯽 󰯾 󰯿
󰫵 󰬏 󰰀 󰰁 󰰂
󱂈 󰬐 󰰃 󰰄 󰰅
󰫷 󰬑 󰰆 󰰇 󰰈
󰫸 󰬒 󰰉 󰰊 󰰋
󱎦 󰬓 󰰌 󰰍 󰰎
󰫺 󰬔 󰰏 󰰐 󰰑
󰫻 󰬕 󰰒 󰰓 󰰔
󰬹 󰬖 󰰕 󰲞 󰲟
󰫽 󰬗 󰰘 󰰙 󰰚
󰫾 󰬘 󰰛 󰰜 󰰝
󰫿 󰬙 󰰞 󰰟 󰰠
󰬀 󰬚 󰰡 󰰢 󰰣
󰬁 󰬛 󰰤 󰰥 󰰦
󰬂 󰬜 󰰧 󰰨 󰰩
󱂌 󰬝 󰰪 󰰫 󰰬
󰬄 󰬞 󰰭 󰰮 󰰯
󱂑 󰬟 󰰰 󰰱 󰰲
󰬆 󰬠 󰰳 󰰴 󰰵
󰬇 󰬡 󰰶 󰰷 󰰸

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions