From e2f2e8f25e1b4507d502bea3900031c16eb6a52d Mon Sep 17 00:00:00 2001 From: Jose Colon Rodriguez Date: Sun, 18 Feb 2024 13:28:09 -0400 Subject: Added cjk build option to set ambiguous width to 2 at build time --- codegen/dwp.zig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'codegen/dwp.zig') diff --git a/codegen/dwp.zig b/codegen/dwp.zig index a8cef57..36ab7cb 100644 --- a/codegen/dwp.zig +++ b/codegen/dwp.zig @@ -1,5 +1,7 @@ const std = @import("std"); +const options = @import("options"); + const block_size = 256; const Block = [block_size]i3; @@ -75,7 +77,10 @@ pub fn main() !void { }, 1 => { // Width - if (std.mem.eql(u8, field, "W") or std.mem.eql(u8, field, "F")) { + if (std.mem.eql(u8, field, "W") or + std.mem.eql(u8, field, "F") or + (options.cjk and std.mem.eql(u8, field, "A"))) + { for (current_code[0]..current_code[1] + 1) |cp| try flat_map.put(@intCast(cp), 2); } }, -- cgit v1.2.3