summaryrefslogtreecommitdiff
path: root/src/unicode/grapheme.zig
AgeCommit message (Collapse)Author
2025-09-23Merge remote-tracking branch 'upstream/main' into jacob/uucodeJacob Sandlund
2025-09-20unicode: delete props.zig and clean up symbols deps tooMitchell Hashimoto
Follow up to #8810 Same reasoning.
2025-09-18set max for unicode grapheme executableJacob Sandlund
2025-09-18fix up diff from benchmarks, and add tests against ziglyphJacob Sandlund
2025-09-06trying a bunch of things to get performance to matchJacob Sandlund
2025-08-17removing all ziglyph imports (aside from unicode/grapheme.zig)Jacob Sandlund
2025-03-12Lots of 0.14 changesMitchell Hashimoto
2024-12-12unicode: emoji modifier requires emoji modifier base preceding to not breakMitchell Hashimoto
Fixes #2941 This fixes the rendering of the text below. For those that can't see it, it is the following in UTF-32: `0x22 0x1F3FF 0x22`. ``` "🏿" ``` `0x1F3FF` is the Fitzpatrick modifier for dark skin tone. It has the Unicode property `Emoji_Modifier`. Emoji modifiers are defined in UTS #51 and are only valid based on ED-13: ``` emoji_modifier_sequence := emoji_modifier_base emoji_modifier emoji_modifier_base := \p{Emoji_Modifier_Base} emoji_modifier := \p{Emoji_Modifier} ``` Additional quote from UTS #51: > To have an effect on an emoji, an emoji modifier must immediately follow > that base emoji character. Emoji presentation selectors are neither needed > nor recommended for emoji characters when they are followed by emoji > modifiers, and should not be used in newly generated emoji modifier > sequences; the emoji modifier automatically implies the emoji presentation > style. Our precomputed grapheme break table was mistakingly not following this rule. This commit fixes that by adding a check for that every `Emoji_Modifier` character must be preceded by an `Emoji_Modifier_Base`. This only has a cost during compilation (table generation). The runtime cost is identical; the table size didn't increase since we had leftover bits we could use.
2024-02-09unicode: precompute grapheme break dataMitchell Hashimoto
2024-02-09unicode: use packed struct for break stateMitchell Hashimoto
2024-02-09unicode: remove unusedMitchell Hashimoto
2024-02-09unicode: direct port of ziglyph to startMitchell Hashimoto