summaryrefslogtreecommitdiff
path: root/src/DisplayWidth.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use width 2 when skin tone modifier detectedGravatar Sam Atman3 days1-0/+5
| | | | Fix: #82
* Fix #74: Check for characters before popping in wrapv0.15.3Gravatar Sam Atman3 days1-2/+16
|
* Update codebase to Zig 0.15.1.Gravatar Michael Chaten2025-09-141-6/+2
| | | | Removes compression support
* Make DisplayWidth.setup publicv0.14.0-rc2Gravatar Sam Atman2025-05-041-1/+7
| | | | Also adds setupWithGraphemes variant.
* Allocation Failure TestsGravatar Sam Atman2025-04-301-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.
* Update README.md to new APIGravatar Sam Atman2025-04-301-10/+10
|
* Factor out 'Data' for grapheme and DisplayWidthGravatar Sam Atman2025-04-301-76/+164
| | | | | In the process of refactoring the whole library, so that it doesn't expose anything called "Data" separately from user functionality.
* Add general tests stepGravatar Sam Atman2025-04-291-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.
* Add c0 and c1 control width optionsGravatar Sam Atman2025-03-201-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}.
* DisplayWidth: explicitly set width to 2 when VS16 is foundGravatar Tim Culverhouse2024-04-111-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
* ScriptsData and made all Datas constGravatar Jose Colon Rodriguez2024-03-271-5/+5
|
* Rename DisplayWidthDataGravatar Jose Colon Rodriguez2024-03-271-7/+7
|
* Using separate data struct model.Gravatar Jose Colon Rodriguez2024-02-261-0/+351