diff options
| author | 2026-01-13 01:10:17 +0300 | |
|---|---|---|
| committer | 2026-01-13 01:10:17 +0300 | |
| commit | dfece51720a17fddd0520ce8bda1a3c05d110949 (patch) | |
| tree | d841e9321c1135ba5644b444ba7bb508ec4df025 /src/CombiningData.zig | |
| parent | Moved part of the `strWidth` into its own `graphemeClusterWidth` function (diff) | |
| parent | Merge pull request 'Use width 2 when skin tone modifier detected' (#96) from ... (diff) | |
| download | zg-dfece51720a17fddd0520ce8bda1a3c05d110949.tar.gz zg-dfece51720a17fddd0520ce8bda1a3c05d110949.tar.xz zg-dfece51720a17fddd0520ce8bda1a3c05d110949.zip | |
Merge branch 'master' of https://codeberg.org/atman/zg into graphemeClusterWidth
Diffstat (limited to 'src/CombiningData.zig')
| -rw-r--r-- | src/CombiningData.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/CombiningData.zig b/src/CombiningData.zig index fd64a3b..f58e0de 100644 --- a/src/CombiningData.zig +++ b/src/CombiningData.zig | |||
| @@ -6,11 +6,9 @@ s2: []u8 = undefined, | |||
| 6 | const CombiningData = @This(); | 6 | const CombiningData = @This(); |
| 7 | 7 | ||
| 8 | pub fn init(allocator: mem.Allocator) !CombiningData { | 8 | pub fn init(allocator: mem.Allocator) !CombiningData { |
| 9 | const decompressor = compress.flate.inflate.decompressor; | ||
| 10 | const in_bytes = @embedFile("ccc"); | 9 | const in_bytes = @embedFile("ccc"); |
| 11 | var in_fbs = std.io.fixedBufferStream(in_bytes); | 10 | var in_fbs = std.io.fixedBufferStream(in_bytes); |
| 12 | var in_decomp = decompressor(.raw, in_fbs.reader()); | 11 | var reader = in_fbs.reader(); |
| 13 | var reader = in_decomp.reader(); | ||
| 14 | 12 | ||
| 15 | const endian = builtin.cpu.arch.endian(); | 13 | const endian = builtin.cpu.arch.endian(); |
| 16 | 14 | ||
| @@ -46,5 +44,4 @@ pub fn isStarter(cbdata: CombiningData, cp: u21) bool { | |||
| 46 | 44 | ||
| 47 | const std = @import("std"); | 45 | const std = @import("std"); |
| 48 | const builtin = @import("builtin"); | 46 | const builtin = @import("builtin"); |
| 49 | const compress = std.compress; | ||
| 50 | const mem = std.mem; | 47 | const mem = std.mem; |