summaryrefslogtreecommitdiff
path: root/src/DisplayWidth.zig (unfollow)
Commit message (Collapse)AuthorFilesLines
3 daysUse width 2 when skin tone modifier detectedGravatar Sam Atman1-0/+5
Fix: #82
3 daysFix #74: Check for characters before popping in wrapv0.15.3Gravatar Sam Atman1-2/+16
2025-09-14Update codebase to Zig 0.15.1.Gravatar Michael Chaten1-6/+2
Removes compression support
2025-05-04Make DisplayWidth.setup publicv0.14.0-rc2Gravatar Sam Atman1-1/+7
Also adds setupWithGraphemes variant.
2025-04-30Allocation Failure TestsGravatar Sam Atman1-26/+46
These turned up an excessive amount of allocations in CanonData and CompatData, which have been reduced to two through the somewhat squirrely use of 'magic numbers'. There are now allocation tests for every allocated structure in the library, and they run to completion in a reasonable amount of time. So, that's nice.
2025-04-30Update README.md to new APIGravatar Sam Atman1-10/+10
2025-04-30Factor out 'Data' for grapheme and DisplayWidthGravatar Sam Atman1-76/+164
In the process of refactoring the whole library, so that it doesn't expose anything called "Data" separately from user functionality.
2025-04-29Add general tests stepGravatar Sam Atman1-5/+5
After a considerable slog, all tests are reachable from the test step, and pass. Almost every failure was related to the change away from the inclusion of an allocator on this or that.
2025-03-20Add c0 and c1 control width optionsGravatar Sam Atman1-5/+9
This allows a build of DisplayWidth to give characters in those classes a width, for cases where they'll be printed with a substitute in the final display. It also raises the size of possible characters from an i3 to an i4, to accommodate printing C1s as e.g. <80> or \u{80}.
2024-04-11DisplayWidth: explicitly set width to 2 when VS16 is foundGravatar Tim Culverhouse1-0/+4
Explicitly set the width of an emoji to two when the next codepoint is a VS16 selector. Add unit test for this case. This is essentially the same PR as https://codeberg.org/dude_the_builder/ziglyph/pulls/11
2024-03-27ScriptsData and made all Datas constGravatar Jose Colon Rodriguez1-5/+5
2024-03-27Rename DisplayWidthDataGravatar Jose Colon Rodriguez1-7/+7
2024-02-26Using separate data struct model.Gravatar Jose Colon Rodriguez1-107/+98
2024-02-18center, padLeft, padRight, and wrapGravatar Jose Colon Rodriguez1-45/+248
2024-02-18Testing Ghostty's Utf8Decoder. A bit slowerGravatar Jose Colon Rodriguez1-4/+3
2024-02-18Code point code is now a method not a field.Gravatar Jose Colon Rodriguez1-3/+4
2024-02-18Code point and grapheme are now namespaces.Gravatar Jose Colon Rodriguez1-2/+2
2024-02-17Fixed isAsciiOnly and CodePointIterator ASCII bugsGravatar Jose Colon Rodriguez1-4/+5
2024-02-17display_width tweaksGravatar Jose Colon Rodriguez1-12/+18
2024-02-17isAsciiOnly SIMD tweaksGravatar Jose Colon Rodriguez1-2/+6
2024-02-16SIMD strWidth ASCII optimizationGravatar Jose Colon Rodriguez1-1/+36
2024-02-16display_width with tableGravatar Jose Colon Rodriguez1-0/+111