mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
renderer: constrain dingbats category to cell size
Dingbats are generally symbolic glyphs that frequently overflow the cell. Their defined codepoint width is "1" so they take one cell but very often overflow to the next. This extends the previously created logic for Nerd Font symbols such that when a dingbat is next to whitespace, we allow it to use the full size, but when a dingbat is next to an occupied cell we constrain it to the cell size.
This commit is contained in:
@ -41,7 +41,9 @@ pub fn fgMode(
|
||||
// the subsequent character is empty, then we allow it to use
|
||||
// the full glyph size. See #1071.
|
||||
.text => text: {
|
||||
if (!ziglyph.general_category.isPrivateUse(@intCast(cell.char))) {
|
||||
if (!ziglyph.general_category.isPrivateUse(@intCast(cell.char)) and
|
||||
!ziglyph.blocks.isDingbats(@intCast(cell.char)))
|
||||
{
|
||||
break :text .normal;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user