summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add c0 and c1 control width optionsGravatar Sam Atman2025-03-205-42/+63
| | | | | | | 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}.
* Update LICENSE, add CONTRIBUTORS.mdGravatar Sam Atman2025-03-202-0/+15
|
* Version bump for 0.14 compatibilityv0.13.5Gravatar Sam Atman2025-03-202-2/+2
|
* Merge pull request 'zon update on Zig 0.14.0' (#27) from TUSF/zg:zig-0.14.0 ↵Gravatar atman2025-03-211-2/+3
|\ | | | | | | | | | | into master Reviewed-on: https://codeberg.org/atman/zg/pulls/27
| * zon update on Zig 0.14.0Gravatar Jeremia Dominguez2025-03-051-2/+3
|/
* Merge pull request 'fix removed b.host on v0.14.0-dev.2568+42dac40b3' (#25) ↵Gravatar atman2025-01-261-16/+16
|\ | | | | | | | | | | from e0328eric/zg:master into master Reviewed-on: https://codeberg.org/atman/zg/pulls/25
| * fix removed b.host on v0.14.0-dev.2568+42dac40b3Gravatar Sungbae Jeong2024-12-281-16/+16
|/
* README + zon update v0.13.4v0.13.4Gravatar Sam Atman2024-12-132-6/+6
|
* Merge pull request 'Fix leak of cwcf_exceptions in FoldData' (#21) from ↵Gravatar atman2024-12-131-0/+2
|\ | | | | | | | | | | squeek502/zg:folddata-leak into master Reviewed-on: https://codeberg.org/atman/zg/pulls/21
| * Fix leak of cwcf_exceptions in FoldDataGravatar Ryan Liptak2024-12-041-0/+2
|/ | | | Closes #20
* Update URL in READMEGravatar Sam Atman2024-11-261-14/+38
| | | | Also documents the `cjk` option, and how to enable it.
* Update README.mdGravatar dude_the_builder2024-11-111-4/+0
|
* Needs MaintainerGravatar Jose Colon Rodriguez2024-11-081-0/+4
|
* Updated rEADMEGravatar Jose Colon Rodriguez2024-11-031-2/+2
|
* Merge pull request 'grapheme-peek' (#18) from atman/zg:grapheme-peek into masterGravatar Jose Colon2024-11-032-8/+103
|\ | | | | | | Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/18
| * Add peek() to Grapheme.IteratorGravatar Sam Atman2024-11-022-0/+95
| | | | | | | | | | This does the expected thing: returns the next ?Grapheme without mutation of the iteration state.
| * Replace deprecated uses of std.mem.splitGravatar Sam Atman2024-11-021-8/+8
|/
* Merge pull request 'GraphemeData and WidthData: make init read errors ↵Gravatar Jose Colon2024-10-202-12/+12
|\ | | | | | | | | | | unreachable and define return errorset' (#16) from rockorager/zg:master into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/16
| * WidthData: define error set as mem.Allocator.ErrorGravatar Tim Culverhouse2024-10-141-5/+5
| | | | | | | | | | | | | | The reader is a static embedded file. All of the reads are readInt. This function should not ever fail at runtime with a read error. Make all read errors unreachable, leaving only allocation errors as the error set.
| * GraphemeData: define error set as mem.Allocator.ErrorGravatar Tim Culverhouse2024-10-141-7/+7
|/ | | | | | | The reader is a static embedded file. All of the reads are either a readInt or a readAll into a previously allocated buffer. This function should not ever fail at runtime with a read error. Make all read errors unreachable, leaving only allocation errors as the error set.
* Fixed benchmark duration printingGravatar Jose Colon Rodriguez2024-07-1812-23/+23
|
* Merge pull request 'refactor CodePoint.Iterator into a reusable fn' (#11) ↵Gravatar Jose Colon2024-07-061-57/+79
|\ | | | | | | | | | | from lygaret/zg:master into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/11
| * refactor CodePoint.Iterator into a reusable fnGravatar Jonathan Raphaelson2024-07-051-57/+79
|/ | | | | | without changing the algorithm at all, move the responsibility of decoding a u8 slice out of the iterator, and into a reusable function so that it can be used by consumers of the library
* README updata to v0.13.2v0.13.2Gravatar Jose Colon Rodriguez2024-06-281-1/+1
|
* Merge pull request 'bench: Fix for Windows and use fmtDuration' (#9) from ↵Gravatar Jose Colon2024-06-2712-71/+71
|\ | | | | | | | | | | squeek502/zg:bench-windows-and-fmt into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/9
| * bench: Fix for Windows and use fmtDurationGravatar Ryan Liptak2024-06-2712-71/+71
| |
* | Merge pull request 'FoldData: Minimize Changes_When_Casefolded data' (#10) ↵Gravatar Jose Colon2024-06-272-8/+34
|\ \ | |/ |/| | | | | | | from squeek502/zg:folddata-min into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/10
| * FoldData: Minimize Changes_When_Casefolded dataGravatar Ryan Liptak2024-06-272-8/+34
|/ | | | | | | | | | | | | | | | | | Only a few codepoints have a mapping in CaseFolding.txt but do not have the Changes_When_Casefolded property set. So, FoldData can just store a list of those particular codepoints and then re-use the encoded CaseFolding.txt data alongside it in order to implement changesWhenCaseFolded. This reduces the size of fold.bin.z from 4,387 bytes (4.28KiB) to 1,165 bytes (1.13KiB). This also seemingly introduced a very slight performance regression in zg_caseless. Before: zg CaseFold.compatCaselessMatch: result: 626, took: 258ns zg CaseFold.canonCaselessMatch: result: 626, took: 129ns After: zg CaseFold.compatCaselessMatch: result: 626, took: 263ns zg CaseFold.canonCaselessMatch: result: 626, took: 131ns
* Implements new case fold data encoding by @sqeek502 #8Gravatar Jose Colon Rodriguez2024-06-261-5/+6
|
* Removed all inlinesGravatar Jose Colon Rodriguez2024-06-2611-33/+35
|
* Added changes when casefolded backGravatar Jose Colon Rodriguez2024-06-262-33/+55
|
* Implemented sqeek502s case foldGravatar Jose Colon Rodriguez2024-06-263-133/+245
|
* Merge pull request 'Normalize: Mark utf8Encode errors as unreachable, use ↵Gravatar Jose Colon2024-06-261-11/+11
|\ | | | | | | | | | | explicit error sets' (#7) from squeek502/zg:normalize-utf8encode-error into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/7
| * Normalize: Mark utf8Encode errors as unreachable, use explicit error setsGravatar Ryan Liptak2024-06-251-11/+11
|/ | | | These utf8Encode calls are converting normalized codepoints back into UTF-8, so the codepoints can be assumed to be valid.
* Update READMEGravatar Jose Colon Rodriguez2024-06-151-1/+2
|
* Updated README for tag v0.13.1v0.13.1Gravatar Jose Colon Rodriguez2024-06-101-1/+1
|
* Merge pull request 'codepoint: prevent panic when last cp too short' (#6) ↵Gravatar Jose Colon Rodriguez2024-06-101-0/+11
|\ | | | | | | | | | | from rockorager/zg:master into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/6
| * Merge branch 'master' into pr6Gravatar Jose Colon Rodriguez2024-06-104-8/+5
| |\ | |/ |/|
* | Updated README for v0.13.0v0.13.0Gravatar Jose Colon Rodriguez2024-06-081-2/+2
| |
* | Updated benchmarkGravatar Jose Colon Rodriguez2024-06-072-3/+3
| |
* | Merge pull request 'build: use b.path everywhere' (#5) from ↵Gravatar Jose Colon2024-06-071-1/+1
|\ \ | | | | | | | | | | | | | | | rockorager/zg:master into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/5
* | | Updated build.zig b.pathGravatar Jose Colon Rodriguez2024-05-192-39/+36
| | |
| | * codepoint: prevent panic when last cp too shortGravatar Tim Culverhouse2024-06-101-0/+11
| |/ | | | | | | | | | | | | | | | | | | | | If the last codepoint in a byte slice is incomplete (IE has a length of 3 but there are only 2 bytes remaining), the iterator will panic. Instead of panicking, prefer to return a replacement character. This strategy is similar to that in the block just above which returns a replacement character if the first byte is not valid. In this latter block, we also consume only one byte and allow the iterator to continue. This allows for sections of text which may have a single byte incorrect near the end of the slice.
| * build: use b.path everywhereGravatar Tim Culverhouse2024-06-072-37/+37
|/ | | | | | Use b.path everywhere in build.zig to make library compatible with zig 0.13.0. Also in 0.13.0, zig-cache was moved to .zig-cache. Update .gitignore accordingly.
* Removed emoji modifier display width = 0 case.Gravatar Jose Colon Rodriguez2024-05-032-3/+3
|
* Merge pull request 'DisplayWidth: explicitly set width to 2 when VS16 is ↵Gravatar Jose Colon2024-04-111-0/+4
|\ | | | | | | | | | | found' (#3) from rockorager/zg:vs-16 into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/3
| * 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
* | Merge pull request 'grapheme: export grapheme.State struct' (#2) from ↵Gravatar Jose Colon2024-04-111-1/+1
|\ \ | |/ |/| | | | | | | rockorager/zg:gb-state into master Reviewed-on: https://codeberg.org/dude_the_builder/zg/pulls/2
| * grapheme: export grapheme.State structGravatar Tim Culverhouse2024-04-111-1/+1
|/ | | | | | The public function `graphemeBreak` requires a reference to a State struct, however this type is not exported. Export the type to allow users of zg to use this type and call graphemeBreak.
* Updated benchmarksv0.1.0Gravatar Jose Colon Rodriguez2024-04-023-6/+5
|