diff options
| author | Qwerasd <qwerasd205@users.noreply.github.com> | 2025-09-03 18:05:26 -0600 |
|---|---|---|
| committer | Qwerasd <qwerasd205@users.noreply.github.com> | 2025-09-03 18:06:05 -0600 |
| commit | 7c4b45eceef8aaa126d86c0c229dcdb33c30a18f (patch) | |
| tree | c9c0ebce42b1cfd99d6dd0ee79c62d9744f3830f /src/renderer | |
| parent | 24647288519117a0841e4824f8663598810483bc (diff) | |
font: expand set of characters considered symbols
Low hanging fruit of some Unicode blocks that are full of very symbol-y
characters.
Diffstat (limited to 'src/renderer')
| -rw-r--r-- | src/renderer/cell.zig | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/renderer/cell.zig b/src/renderer/cell.zig index eeb51bdf0..ec13b8953 100644 --- a/src/renderer/cell.zig +++ b/src/renderer/cell.zig @@ -237,13 +237,27 @@ pub fn isCovering(cp: u21) bool { /// Returns true of the codepoint is a "symbol-like" character, which /// for now we define as anything in a private use area and anything -/// in the "dingbats" unicode block. +/// in several unicode blocks: +/// - Dingbats +/// - Emoticons +/// - Miscellaneous Symbols +/// - Enclosed Alphanumerics +/// - Enclosed Alphanumeric Supplement +/// - Miscellaneous Symbols and Pictographs +/// - Transport and Map Symbols /// /// In the future it may be prudent to expand this to encompass more /// symbol-like characters, and/or exclude some PUA sections. pub fn isSymbol(cp: u21) bool { + // TODO: This should probably become a codegen'd LUT return ziglyph.general_category.isPrivateUse(cp) or - ziglyph.blocks.isDingbats(cp); + ziglyph.blocks.isDingbats(cp) or + ziglyph.blocks.isEmoticons(cp) or + ziglyph.blocks.isMiscellaneousSymbols(cp) or + ziglyph.blocks.isEnclosedAlphanumerics(cp) or + ziglyph.blocks.isEnclosedAlphanumericSupplement(cp) or + ziglyph.blocks.isMiscellaneousSymbolsAndPictographs(cp) or + ziglyph.blocks.isTransportAndMapSymbols(cp); } /// Returns the appropriate `constraint_width` for |
