diff --git a/src/font/nerd_font_attributes.zig b/src/font/nerd_font_attributes.zig index 04088b1aa..138108288 100644 --- a/src/font/nerd_font_attributes.zig +++ b/src/font/nerd_font_attributes.zig @@ -9,17 +9,6 @@ const Constraint = @import("face.zig").RenderOptions.Constraint; /// Get the constraints for the provided codepoint. pub fn getConstraint(cp: u21) ?Constraint { return switch (cp) { - 0x2500...0x259f, - => .{ - .size = .stretch, - .max_constraint_width = 1, - .align_horizontal = .center1, - .align_vertical = .center1, - .pad_left = -0.02, - .pad_right = -0.02, - .pad_top = -0.01, - .pad_bottom = -0.01, - }, 0x2630, => .{ .size = .cover, @@ -67,6 +56,13 @@ pub fn getConstraint(cp: u21) ?Constraint { .pad_top = 0.15, .pad_bottom = 0.15, }, + 0xe0a0...0xe0a3, + 0xe0cf, + => .{ + .size = .fit_cover1, + .align_horizontal = .center1, + .align_vertical = .center1, + }, 0xe0b0, => .{ .size = .stretch, @@ -147,18 +143,6 @@ pub fn getConstraint(cp: u21) ?Constraint { .align_vertical = .center1, .max_xy_ratio = 0.5, }, - 0xe0b8, - 0xe0bc, - => .{ - .size = .stretch, - .max_constraint_width = 1, - .align_horizontal = .start, - .align_vertical = .center1, - .pad_left = -0.05, - .pad_right = -0.05, - .pad_top = -0.01, - .pad_bottom = -0.01, - }, 0xe0b9, 0xe0bd, => .{ @@ -167,18 +151,6 @@ pub fn getConstraint(cp: u21) ?Constraint { .align_horizontal = .start, .align_vertical = .center1, }, - 0xe0ba, - 0xe0be, - => .{ - .size = .stretch, - .max_constraint_width = 1, - .align_horizontal = .end, - .align_vertical = .center1, - .pad_left = -0.05, - .pad_right = -0.05, - .pad_top = -0.01, - .pad_bottom = -0.01, - }, 0xe0bb, 0xe0bf, => .{ @@ -290,14 +262,6 @@ pub fn getConstraint(cp: u21) ?Constraint { .align_horizontal = .start, .align_vertical = .center1, }, - 0xe0cf, - 0xe0d3, - 0xe0d5, - => .{ - .size = .fit_cover1, - .align_horizontal = .center1, - .align_vertical = .center1, - }, 0xe0d2, => .{ .size = .stretch, @@ -346,50 +310,1371 @@ pub fn getConstraint(cp: u21) ?Constraint { .pad_bottom = -0.01, .max_xy_ratio = 0.7, }, + 0xe300, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8984375000000000, + .relative_y = 0.0986328125000000, + }, + 0xe301, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8798828125000000, + .relative_y = 0.1171875000000000, + }, + 0xe302, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7646484375000000, + .relative_y = 0.2314453125000000, + }, + 0xe303, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8789062500000000, + .relative_y = 0.1171875000000000, + }, + 0xe304, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9755859375000000, + .relative_y = 0.0244140625000000, + }, + 0xe305, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9960937500000000, + .relative_y = 0.0019531250000000, + }, + 0xe306, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9863281250000000, + .relative_y = 0.0097656250000000, + }, + 0xe307, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9951171875000000, + .relative_y = 0.0039062500000000, + }, + 0xe308, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9785156250000000, + .relative_y = 0.0195312500000000, + }, + 0xe309, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9736328125000000, + .relative_y = 0.0214843750000000, + }, + 0xe30a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9648437500000000, + .relative_y = 0.0302734375000000, + }, + 0xe30b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8437500000000000, + .relative_y = 0.1513671875000000, + }, + 0xe30c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8027343750000000, + .relative_y = 0.1835937500000000, + }, + 0xe30d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7753906250000000, + .relative_y = 0.1083984375000000, + }, + 0xe30e, + 0xe365, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9833984375000000, + .relative_y = 0.0166015625000000, + }, + 0xe30f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9716796875000000, + .relative_y = 0.0263671875000000, + }, + 0xe310, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6621093750000000, + .relative_y = 0.0986328125000000, + }, + 0xe311, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6425781250000000, + .relative_y = 0.1171875000000000, + }, + 0xe312, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5322265625000000, + .relative_y = 0.2314453125000000, + }, + 0xe313, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6416015625000000, + .relative_y = 0.1181640625000000, + }, + 0xe314, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7382812500000000, + .relative_y = 0.0195312500000000, + }, + 0xe315, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6787109375000000, + .relative_y = 0.1357421875000000, + }, + 0xe316, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7480468750000000, + .relative_y = 0.0097656250000000, + }, + 0xe317, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7529296875000000, + .relative_y = 0.0048828125000000, + }, + 0xe318, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7314453125000000, + .relative_y = 0.0263671875000000, + }, + 0xe319, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7402343750000000, + .relative_y = 0.0195312500000000, + }, + 0xe31a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7294921875000000, + .relative_y = 0.0283203125000000, + }, + 0xe31b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6074218750000000, + .relative_y = 0.1503906250000000, + }, + 0xe31c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7363281250000000, + .relative_y = 0.0224609375000000, + }, + 0xe31d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7460937500000000, + .relative_y = 0.0126953125000000, + }, + 0xe31e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.2675781250000000, + .relative_y = 0.3310546875000000, + }, + 0xe31f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7363281250000000, + .relative_y = 0.0986328125000000, + }, + 0xe320, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7177734375000000, + .relative_y = 0.1171875000000000, + }, + 0xe321, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8085937500000000, + .relative_y = 0.0253906250000000, + }, + 0xe322, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7509765625000000, + .relative_y = 0.0839843750000000, + }, + 0xe323, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8281250000000000, + .relative_y = 0.0097656250000000, + }, + 0xe324, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8349609375000000, + }, + 0xe325, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8154296875000000, + .relative_y = 0.0214843750000000, + }, + 0xe326, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8144531250000000, + .relative_y = 0.0195312500000000, + }, + 0xe327, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8076171875000000, + .relative_y = 0.0273437500000000, + }, + 0xe328, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6845703125000000, + .relative_y = 0.1503906250000000, + }, + 0xe329, + 0xe367, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8173828125000000, + .relative_y = 0.0175781250000000, + }, + 0xe32a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8105468750000000, + .relative_y = 0.0263671875000000, + }, + 0xe32b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5175781250000000, + .relative_y = 0.2421875000000000, + }, + 0xe32c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6992187500000000, + .relative_y = 0.1005859375000000, + }, + 0xe32d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6787109375000000, + .relative_y = 0.1201171875000000, + }, + 0xe32e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5654296875000000, + .relative_y = 0.2324218750000000, + }, + 0xe32f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7714843750000000, + .relative_y = 0.0273437500000000, + }, + 0xe330, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7148437500000000, + .relative_y = 0.0830078125000000, + }, + 0xe331, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7919921875000000, + .relative_y = 0.0097656250000000, + }, + 0xe332, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7871093750000000, + .relative_y = 0.0126953125000000, + }, + 0xe333, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7714843750000000, + .relative_y = 0.0263671875000000, + }, + 0xe334, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7773437500000000, + .relative_y = 0.0195312500000000, + }, + 0xe335, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7714843750000000, + .relative_y = 0.0283203125000000, + }, + 0xe336, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6503906250000000, + .relative_y = 0.1503906250000000, + }, + 0xe337, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7753906250000000, + .relative_y = 0.0234375000000000, + }, + 0xe338, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7792968750000000, + .relative_y = 0.0185546875000000, + }, + 0xe339, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4882812500000000, + .relative_y = 0.2109375000000000, + }, + 0xe33a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5283203125000000, + .relative_y = 0.2324218750000000, + }, + 0xe33b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5449218750000000, + .relative_y = 0.2148437500000000, + }, + 0xe33c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6006674082313682, + .relative_y = 0.1952169076751947, + }, + 0xe33d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5273437500000000, + .relative_y = 0.2324218750000000, + }, + 0xe33e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.1904296875000000, + .relative_y = 0.5986328125000000, + }, + 0xe33f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3300781250000000, + .relative_y = 0.3544921875000000, + }, + 0xe340, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5273437500000000, + .relative_y = 0.2373046875000000, + }, + 0xe341, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4814453125000000, + .relative_y = 0.2138671875000000, + }, + 0xe343, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6816406250000000, + .relative_y = 0.1591796875000000, + }, + 0xe344, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3369140625000000, + .relative_y = 0.3154296875000000, + }, + 0xe345, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6073507601038191, + .relative_y = 0.1629495736002966, + }, + 0xe348, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6347656250000000, + .relative_y = 0.1826171875000000, + }, + 0xe349, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3402542969850663, + .relative_y = 0.3471400394477318, + }, + 0xe34b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6621093750000000, + .relative_y = 0.1689453125000000, + }, + 0xe34c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8662109375000000, + .relative_y = 0.1337890625000000, + }, + 0xe34d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9892578125000000, + }, + 0xe351, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7992831541218638, + .relative_y = 0.0919952210274791, + }, + 0xe352, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4050179211469534, + .relative_y = 0.3739545997610514, + }, + 0xe353, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7040688830943068, + .relative_y = 0.1811983920034767, + }, + 0xe356, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7564102564102564, + .relative_y = 0.1213017751479290, + }, + 0xe357, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7509765625000000, + .relative_y = 0.1230468750000000, + }, + 0xe358, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7490234375000000, + .relative_y = 0.1250000000000000, + }, + 0xe359, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7643248629795715, + .relative_y = 0.1121076233183857, + }, + 0xe35a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7643248629795715, + .relative_y = 0.1111111111111111, + }, + 0xe35b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7683109118086696, + .relative_y = 0.1111111111111111, + }, + 0xe35c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9895366218236173, + }, + 0xe35d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5590433482810164, + .relative_y = 0.2152466367713005, + }, + 0xe35e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7443946188340808, + .relative_y = 0.0134529147982063, + }, + 0xe35f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9845540607872446, + .relative_y = 0.0154459392127554, + }, + 0xe360, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7852516193323368, + .relative_y = 0.0154459392127554, + }, + 0xe361, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8241155954160438, + .relative_y = 0.0124564025909317, + }, + 0xe364, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8251953125000000, + .relative_y = 0.0097656250000000, + }, + 0xe366, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7832031250000000, + .relative_y = 0.0166015625000000, + }, + 0xe369, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4902343750000000, + .relative_y = 0.2548828125000000, + }, + 0xe36b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9335937500000000, + .relative_y = 0.0263671875000000, + }, + 0xe36c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7076171875000000, + .relative_y = 0.1083984375000000, + }, + 0xe36d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8427734375000000, + .relative_y = 0.0625000000000000, + }, + 0xe36e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8712355686563498, + .relative_y = 0.0383689511176615, + }, + 0xe371, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6163708086785010, + .relative_y = 0.1903353057199211, + }, + 0xe372, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9725209080047790, + }, + 0xe373, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8737672583826430, + .relative_y = 0.0009861932938856, + }, + 0xe374, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3185404339250493, + .relative_y = 0.2840236686390533, + }, + 0xe375, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6839250493096647, + .relative_y = 0.1267258382642998, + }, + 0xe376, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7061143984220908, + .relative_y = 0.1301775147928994, + }, + 0xe377, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7386587771203156, + .relative_y = 0.1518737672583826, + }, + 0xe378, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7386587771203156, + .relative_y = 0.1508875739644970, + }, + 0xe379, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5808678500986193, + .relative_y = 0.1794871794871795, + }, + 0xe37a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5315581854043393, + .relative_y = 0.2258382642998027, + }, + 0xe37b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5808678500986193, + .relative_y = 0.1804733727810651, + }, + 0xe37d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9003906250000000, + .relative_y = 0.0957031250000000, + }, + 0xe37e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6015625000000000, + .relative_y = 0.2324218750000000, + }, + 0xe37f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3300781250000000, + .relative_y = 0.3593750000000000, + }, + 0xe380, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3300781250000000, + .relative_y = 0.3496093750000000, + }, + 0xe381...0xe383, + 0xe385...0xe388, + 0xf451...0xf453, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7500000000000000, + .relative_y = 0.1250000000000000, + }, + 0xe389...0xe38c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.9987004548408057, + .relative_height = 0.9974025974025974, + .relative_y = 0.0012987012987013, + }, + 0xe38e...0xe391, + 0xe394, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.4990253411306043, + .relative_height = 0.9987012987012988, + .relative_x = 0.4996751137102014, + }, + 0xe392...0xe393, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.4996751137102014, + .relative_height = 0.9987012987012988, + .relative_x = 0.4990253411306043, + }, + 0xe395...0xe396, + 0xe39b, + 0xe3a2...0xe3a8, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7568897637795275, + .relative_y = 0.1190944881889764, + }, + 0xe397...0xe39a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7578740157480315, + .relative_y = 0.1190944881889764, + }, + 0xe39c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7529527559055118, + .relative_y = 0.1190944881889764, + }, + 0xe39d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7539370078740157, + .relative_y = 0.1190944881889764, + }, + 0xe39e...0xe3a0, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7549212598425197, + .relative_y = 0.1190944881889764, + }, + 0xe3a1, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7559055118110236, + .relative_y = 0.1190944881889764, + }, + 0xe3a9, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7568897637795275, + .relative_y = 0.1181102362204724, + }, + 0xe3aa, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9980314960629921, + .relative_y = 0.0019685039370079, + }, + 0xe3ab, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7962598425196851, + }, + 0xe3ac, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8316929133858267, + .relative_y = 0.0019685039370079, + }, + 0xe3ad, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7578740157480315, + .relative_y = 0.0009842519685039, + }, + 0xe3ae, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6200787401574803, + .relative_y = 0.2283464566929134, + }, + 0xe3af, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7057086614173228, + .relative_y = 0.1456692913385827, + }, + 0xe3b0, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7037401574803149, + .relative_y = 0.1476377952755905, + }, + 0xe3b1, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7125062282012955, + .relative_y = 0.1400099651220728, + }, + 0xe3b2, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6982421875000000, + .relative_y = 0.1523437500000000, + }, + 0xe3b3, + 0xe3b5...0xe3b6, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7001953125000000, + .relative_y = 0.1503906250000000, + }, + 0xe3b4, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7011718750000000, + .relative_y = 0.1494140625000000, + }, + 0xe3b7...0xe3bb, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7000244081034903, + .relative_y = 0.1505979985355138, + }, + 0xe3bc, + 0xe3c0, + 0xe3c3, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9997559189650964, + .relative_y = 0.0002440810349036, + }, + 0xe3bd, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9431291188674640, + .relative_y = 0.0285574810837198, + }, + 0xe3be, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9896346920510943, + .relative_y = 0.0051257017329753, + }, + 0xe3bf, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9060288015621186, + .relative_y = 0.0471076397363925, + }, + 0xe3c1, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6590187942396876, + .relative_y = 0.1349768123016842, + }, + 0xe3c2, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7939956065413717, + }, + 0xe3c9...0xe3ca, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9175627240143369, + .relative_y = 0.0824372759856631, + }, 0x23fb...0x23fe, 0x2665, 0x26a1, 0x2b58, - 0xe000...0xe0a9, - 0xe4fa...0xe7ef, + 0xe000...0xe00a, + 0xe200...0xe2a9, + 0xe342, + 0xe346...0xe347, + 0xe34a, + 0xe34e...0xe350, + 0xe354...0xe355, + 0xe362...0xe363, + 0xe368, + 0xe36a, + 0xe36f...0xe370, + 0xe37c, + 0xe384, + 0xe38d, + 0xe3c4...0xe3c8, + 0xe3cb...0xe3e3, + 0xe5fa...0xe6b8, + 0xe700...0xe8ef, 0xea60, 0xea62...0xea7c, - 0xea7e...0xea98, + 0xea7e...0xea88, + 0xea8a...0xea8c, + 0xea8f...0xea98, 0xeaa3...0xeab3, - 0xeab8...0xead3, - 0xead7...0xeb42, - 0xeb44...0xeb6d, + 0xeab8...0xeac7, + 0xeac9, + 0xeacc...0xead3, + 0xead7...0xeb09, + 0xeb0b...0xeb42, + 0xeb44...0xeb4e, + 0xeb50...0xeb6d, 0xeb72...0xeb89, 0xeb8b...0xeb99, 0xeb9b...0xebd4, 0xebd7...0xec06, 0xec08...0xec0a, 0xec0d...0xec1e, - 0xed00...0xf018, - 0xf01a...0xf02f, - 0xf031...0xf03c, - 0xf041...0xf043, - 0xf045...0xf049, - 0xf04b...0xf050, - 0xf054...0xf059, - 0xf05c...0xf070, - 0xf072...0xf077, - 0xf079...0xf07a, - 0xf07c...0xf080, - 0xf082...0xf08b, - 0xf08d...0xf091, - 0xf093...0xf09e, - 0xf0a0, - 0xf0a5...0xf0a9, - 0xf0ab...0xf0c9, - 0xf0cb...0xf0d5, - 0xf0d7...0xf0dd, - 0xf0df...0xf0e6, - 0xf0e8...0xf295, - 0xf297...0xf2c3, - 0xf2c6...0xf2ef, - 0xf2f1...0xf305, - 0xf307...0xf847, + 0xed00...0xedff, + 0xee0c...0xefce, + 0xf000...0xf004, + 0xf006...0xf025, + 0xf028...0xf02a, + 0xf02c...0xf030, + 0xf034, + 0xf036...0xf043, + 0xf045, + 0xf047, + 0xf053...0xf05f, + 0xf062, + 0xf064...0xf076, + 0xf079...0xf07d, + 0xf07f...0xf088, + 0xf08a...0xf0a3, + 0xf0a6...0xf0d6, + 0xf0db, + 0xf0df...0xf0ff, + 0xf108...0xf12f, + 0xf131...0xf140, + 0xf142...0xf152, + 0xf155, + 0xf15a...0xf174, + 0xf176, + 0xf179...0xf181, + 0xf183...0xf220, + 0xf223, + 0xf22e...0xf254, + 0xf259, + 0xf25c...0xf381, + 0xf400...0xf418, + 0xf41a...0xf42f, + 0xf431...0xf43d, + 0xf43f, + 0xf441...0xf443, + 0xf445...0xf449, + 0xf44b...0xf450, + 0xf454...0xf459, + 0xf45c...0xf470, + 0xf472...0xf47a, + 0xf47c...0xf480, + 0xf482...0xf491, + 0xf493...0xf49e, + 0xf4a0...0xf4c2, + 0xf4c4...0xf4ee, + 0xf4f3...0xf51c, + 0xf51e...0xf532, 0xf0001...0xf1af0, => .{ .size = .fit_cover1, @@ -670,26 +1955,305 @@ pub fn getConstraint(cp: u21) ?Constraint { .relative_width = 0.8008342022940563, .relative_x = 0.1991657977059437, }, - 0xf019, + 0xe0ba, + 0xe0be, + 0xee00, + 0xee03, => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, + .size = .stretch, + .max_constraint_width = 1, + .align_horizontal = .end, .align_vertical = .center1, - .relative_width = 0.8885754583921015, + .pad_left = -0.05, + .pad_right = -0.05, + .pad_top = -0.01, + .pad_bottom = -0.01, }, - 0xf030, - 0xf03e, + 0xee01, + 0xee04, + => .{ + .size = .stretch, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .pad_left = -0.1, + .pad_right = -0.1, + .pad_top = -0.01, + .pad_bottom = -0.01, + }, + 0xe0b8, + 0xe0bc, + 0xee02, + 0xee05, + => .{ + .size = .stretch, + .max_constraint_width = 1, + .align_horizontal = .start, + .align_vertical = .center1, + .pad_left = -0.05, + .pad_right = -0.05, + .pad_top = -0.01, + .pad_bottom = -0.01, + }, + 0xee06, + => .{ + .size = .cover, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.7059415911379657, + .relative_height = 0.2234524408656266, + .relative_x = 0.1470292044310171, + .relative_y = 0.7765475591343735, + .pad_left = 0.03, + .pad_right = 0.03, + .pad_top = 0.03, + .pad_bottom = 0.03, + }, + 0xee07, + => .{ + .size = .cover, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.5000000000000000, + .relative_height = 0.7498741821841973, + .relative_x = 0.5000000000000000, + .relative_y = 0.2501258178158027, + .pad_left = 0.03, + .pad_right = 0.03, + .pad_top = 0.03, + .pad_bottom = 0.03, + }, + 0xee08, + => .{ + .size = .cover, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.6299093655589124, + .relative_height = 0.8535480624056366, + .relative_x = 0.3700906344410876, + .pad_left = 0.03, + .pad_right = 0.03, + .pad_top = 0.03, + .pad_bottom = 0.03, + }, + 0xee09, + => .{ + .size = .cover, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4997483643683945, + .pad_left = 0.03, + .pad_right = 0.03, + .pad_top = 0.03, + .pad_bottom = 0.03, + }, + 0xee0a, + => .{ + .size = .cover, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.6299093655589124, + .relative_height = 0.8535480624056366, + .pad_left = 0.03, + .pad_right = 0.03, + .pad_top = 0.03, + .pad_bottom = 0.03, + }, + 0xee0b, + => .{ + .size = .cover, + .max_constraint_width = 1, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.5000000000000000, + .relative_height = 0.7498741821841973, + .relative_y = 0.2501258178158027, + .pad_left = 0.03, + .pad_right = 0.03, + .pad_top = 0.03, + .pad_bottom = 0.03, + }, + 0xf005, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9999664113932554, + .relative_y = 0.0000335886067446, + }, + 0xf026...0xf027, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9786184354605580, + .relative_y = 0.0103951316192896, + }, + 0xf02b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9758052740827267, + .relative_y = 0.0238869355863696, + }, + 0xf031...0xf033, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9987922705314010, + .relative_y = 0.0006038647342995, + }, + 0xf035, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9989935587761675, + .relative_y = 0.0004025764895330, + }, + 0xf044, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9925925925925926, + }, + 0xf046, + 0xf153...0xf154, + 0xf158, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.8885754583921015, .relative_height = 0.8751322751322751, .relative_y = 0.0624338624338624, }, - 0xf03d, + 0xf048, + 0xf04a, + 0xf04e, + 0xf051, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8577706898990622, + .relative_y = 0.0711892586341537, + }, + 0xf049, + 0xf050, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8579450878868969, + .relative_y = 0.0710148606463189, + }, + 0xf04b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9997041418532618, + .relative_y = 0.0002958581467381, + }, + 0xf04c...0xf04d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8572940020656472, + .relative_y = 0.0713404035569438, + }, + 0xf04f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7138835298072554, + .relative_y = 0.1433479295317200, + }, + 0xf052, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9999748091795350, + }, + 0xf060...0xf061, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8567975830815709, + .relative_y = 0.0719033232628399, + }, + 0xf063, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9987915407854985, + .relative_y = 0.0006042296072508, + }, + 0xf077, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5700483091787439, + .relative_y = 0.2862318840579710, + }, + 0xf078, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5700483091787439, + .relative_y = 0.1437198067632850, + }, + 0xf07e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4989429175475687, + .relative_y = 0.2505285412262157, + }, + 0xf089, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9998488512696494, + .relative_y = 0.0001511487303507, + }, + 0xf0a4...0xf0a5, => .{ .size = .fit_cover1, .height = .icon, @@ -698,277 +2262,388 @@ pub fn getConstraint(cp: u21) ?Constraint { .relative_height = 0.7502645502645503, .relative_y = 0.1248677248677249, }, - 0xf03f, + 0xf0d7, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.5554597570408116, - .relative_x = 0.0005406676069582, + .relative_height = 0.4281400966183575, + .relative_y = 0.2053140096618357, }, - 0xf040, + 0xf0d8, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.8877888683953564, - .relative_height = 0.9992749363119733, - .relative_x = 0.0003164442515641, - .relative_y = 0.0001959631589261, + .relative_height = 0.4281400966183575, + .relative_y = 0.3472222222222222, }, - 0xf044, + 0xf0d9, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.9913442331878375, - .relative_height = 0.9923123057630445, - .relative_y = 0.0002010014265405, + .relative_height = 0.7140772371750631, + .relative_y = 0.1333462732919255, }, - 0xf04a, + 0xf0da, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.8885754583921015, - .relative_height = 0.7506817256817256, - .relative_y = 0.1247354497354497, + .relative_height = 0.7140396210163651, + .relative_y = 0.1333838894506235, }, - 0xf051, + 0xf0dc, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.5557122708039492, - .relative_height = 0.7506817256817256, - .relative_y = 0.1247354497354497, }, - 0xf052, + 0xf0dd, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8741409740917385, - .relative_height = 0.8748851565736010, - .relative_y = 0.0626172338785870, - }, - 0xf053, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.4993711622401420, - .relative_height = 0.8759430588185509, - .relative_y = 0.0620882827561120, - }, - 0xf05a...0xf05b, - 0xf0aa, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.9987423244802840, - .relative_height = 0.9997176214776941, - .relative_y = 0.0002010014265405, - }, - 0xf071, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8885754583921015, - .relative_height = 0.8751322751322751, - .relative_x = 0.0004701457451810, - .relative_y = 0.0624338624338624, - }, - 0xf078, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8745600777856455, - .relative_height = 0.4993298596163721, - .relative_y = 0.1879786499051550, - }, - 0xf07b, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8885754583921015, - .relative_height = 0.8139763779527559, - .relative_y = 0.0930118110236220, - }, - 0xf081, - 0xf092, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8740316426933279, - .relative_height = 0.8748851565736010, - .relative_y = 0.0626172338785870, - }, - 0xf08c, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.7776210625293841, - .relative_height = 0.8751322751322751, - .relative_y = 0.0624338624338624, - }, - 0xf09f, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.5717654171704958, - .relative_x = 0.0006952841596131, - }, - 0xf0a1, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8885754583921015, - .relative_height = 0.9303101594008066, - .relative_y = 0.0349409448818898, - }, - 0xf0a2, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.8749266777006549, - .relative_height = 0.9997176214776941, - .relative_x = 0.0001253913778381, - .relative_y = 0.0002010014265405, - }, - 0xf0a3, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.9994081526966043, - .relative_height = 0.9998551487695376, - .relative_x = 0.0005918473033957, - }, - 0xf0a4, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.9987423244802840, - .relative_height = 0.7500526916695081, - .relative_y = 0.1250334663306335, - }, - 0xf0ca, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.9675646540335450, - .relative_height = 0.8124689241215546, - .relative_y = 0.0938253501046103, - }, - 0xf0d6, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_height = 0.6978346456692913, - .relative_y = 0.1510826771653543, + .relative_height = 0.4275362318840580, + .relative_y = 0.0012077294685990, }, 0xf0de, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.7150686682199350, - .relative_height = 0.3756613756613756, - .relative_x = 0.0004030632809351, - .relative_y = 0.5708994708994709, + .relative_height = 0.4287439613526570, + .relative_y = 0.5712560386473430, }, - 0xf0e7, + 0xf100...0xf101, + 0xf104...0xf105, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.7491243338952770, - .relative_height = 0.9998803756692248, - .relative_x = 0.0006021702214782, - .relative_y = 0.0001196243307751, - }, - 0xf296, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.9994800427141276, - .relative_height = 0.9627792014248586, - .relative_x = 0.0001795653226322, - .relative_y = 0.0187142907131644, - }, - 0xf2c4, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.7523272214386461, - }, - 0xf2c5, - => .{ - .size = .fit_cover1, - .height = .icon, - .align_horizontal = .center1, - .align_vertical = .center1, - .relative_width = 0.9883117728988424, .relative_height = 0.8573155985489722, - .relative_x = 0.0004377219006858, .relative_y = 0.0713422007255139, }, - 0xf2f0, + 0xf102, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.9987423244802840, - .relative_height = 0.9669226518842459, - .relative_y = 0.0165984862232646, + .relative_height = 0.9286577992744861, + .relative_y = 0.0713422007255139, }, - 0xf306, + 0xf103, => .{ .size = .fit_cover1, .height = .icon, .align_horizontal = .center1, .align_vertical = .center1, - .relative_width = 0.7691584391161260, + .relative_height = 0.9286577992744861, + }, + 0xf106...0xf107, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5000000000000000, + .relative_y = 0.2853688029020556, + }, + 0xf130, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9998602571268865, + }, + 0xf141, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.2593984962406015, + .relative_y = 0.3696741854636592, + }, + 0xf156, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8752505446623093, + .relative_y = 0.0623155929038282, + }, + 0xf157, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8756468797564688, + .relative_y = 0.0624338624338624, + }, + 0xf159, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8756067947646895, + .relative_y = 0.0623492063492063, + }, + 0xf175, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9989423585404548, + .relative_y = 0.0005288207297726, + }, + 0xf177...0xf178, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6250661025912215, + .relative_y = 0.1877313590692755, + }, + 0xf182, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.9998046921689268, + }, + 0xf221, + 0xf224...0xf226, + 0xf228, + 0xf22a, + 0xf22c, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9994854643684076, + }, + 0xf222, + 0xf227, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8746819883943630, + .relative_y = 0.0624017379870223, + }, + 0xf229, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9370837263813853, + .relative_y = 0.0624017379870223, + }, + 0xf22b, + 0xf22d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.6874767744332962, + .relative_y = 0.1560043449675557, + }, + 0xf255...0xf256, + 0xf25a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9993997599039616, + }, + 0xf257, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7810124049619848, + .relative_y = 0.0935945806894186, + }, + 0xf258, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7498142113988452, + .relative_y = 0.1247927742525582, + }, + 0xf25b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9975006099019084, + }, + 0xf419, + 0xf45a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8750000000000000, + .relative_y = 0.0625000000000000, + }, + 0xf430, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8496093750000000, + .relative_y = 0.0751953125000000, + }, + 0xf43e, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5024414062500000, + .relative_y = 0.2500000000000000, + }, + 0xf440, + 0xf492, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.8437500000000000, + .relative_y = 0.0781250000000000, + }, + 0xf444, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5000000000000000, + .relative_y = 0.2500000000000000, + }, + 0xf44a, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.4560546875000000, + .relative_y = 0.2719726562500000, + }, + 0xf45b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.0937500000000000, + .relative_y = 0.4531250000000000, + }, + 0xf471, + 0xf481, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9375000000000000, + .relative_y = 0.0312500000000000, + }, + 0xf47b, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.3593750000000000, + .relative_y = 0.3281250000000000, + }, + 0xf49f, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.7680000000000000, + .relative_y = 0.1160000000000000, + }, + 0xf4c3, + 0xf51d, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.5417989417989418, + .relative_y = 0.2291005291005291, + }, + 0xf4ef, + 0xf4f2, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.7142857142857143, + .relative_x = 0.1428571428571428, + }, + 0xf4f0, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.9642857142857143, + .relative_height = 0.7407407407407407, + .relative_y = 0.1111111111111111, + }, + 0xf4f1, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_width = 0.9642857142857143, + .relative_height = 0.7407407407407407, + .relative_x = 0.0357142857142857, + .relative_y = 0.1111111111111111, + }, + 0xf533, + => .{ + .size = .fit_cover1, + .height = .icon, + .align_horizontal = .center1, + .align_vertical = .center1, + .relative_height = 0.9228395061728395, + .relative_y = 0.0390946502057613, }, else => null, }; diff --git a/src/font/nerd_font_codegen.py b/src/font/nerd_font_codegen.py index 4965dabe4..4b1a2b857 100644 --- a/src/font/nerd_font_codegen.py +++ b/src/font/nerd_font_codegen.py @@ -57,6 +57,7 @@ class PatchSetAttributeEntry(TypedDict): class PatchSet(TypedDict): + Name: str SymStart: int SymEnd: int SrcStart: int | None @@ -113,20 +114,43 @@ class PatchSetExtractor(ast.NodeVisitor): if hasattr(ast, "unparse"): return eval( ast.unparse(node), - {"box_keep": True}, - {"self": SimpleNamespace(args=SimpleNamespace(careful=True))}, + {"box_enabled": False, "box_keep": False}, + { + "self": SimpleNamespace( + args=SimpleNamespace( + careful=False, + custom=False, + fontawesome=True, + fontawesomeextension=True, + fontlogos=True, + octicons=True, + codicons=True, + powersymbols=True, + pomicons=True, + powerline=True, + powerlineextra=True, + material=True, + weather=True, + ) + ), + }, ) msg = f"" raise ValueError(msg) from None def process_patch_entry(self, dict_node: ast.Dict) -> None: entry = {} - disallowed_key_nodes = frozenset({"Enabled", "Name", "Filename", "Exact"}) + disallowed_key_nodes = frozenset({"Filename", "Exact"}) for key_node, value_node in zip(dict_node.keys, dict_node.values): if ( isinstance(key_node, ast.Constant) and key_node.value not in disallowed_key_nodes ): + if key_node.value == "Enabled": + if self.safe_literal_eval(value_node): + continue # This patch set is enabled, continue to next key + else: + return # This patch set is disabled, skip key = ast.literal_eval(cast("ast.Constant", key_node)) entry[key] = self.resolve_symbol(value_node) self.patch_set_values.append(cast("PatchSet", entry)) @@ -275,45 +299,109 @@ def generate_zig_switch_arms( entries: dict[int, PatchSetAttributeEntry] = {} for entry in patch_sets: + patch_set_name = entry["Name"] + print(f"Info: Extracting rules from patch set '{patch_set_name}'") + attributes = entry["Attributes"] + patch_set_entries: dict[int, PatchSetAttributeEntry] = {} - for cp in range(entry["SymStart"], entry["SymEnd"] + 1): - entries[cp] = attributes["default"].copy() + # A glyph's scale rules are specified using its codepoint in + # the original font, which is sometimes different from its + # Nerd Font codepoint. In font_patcher, the font to be patched + # (including the Symbols Only font embedded in Ghostty) is + # termed the sourceFont, while the original font is the + # symbolFont. Thus, the offset that maps the scale rule + # codepoint to the Nerd Font codepoint is SrcStart - SymStart. + cp_offset = entry["SrcStart"] - entry["SymStart"] if entry["SrcStart"] else 0 + for cp_rule in range(entry["SymStart"], entry["SymEnd"] + 1): + cp_font = cp_rule + cp_offset + if cp_font not in cmap: + print(f"Info: Skipping missing codepoint {hex(cp_font)}") + continue + elif cp_font in entries: + # Patch sets sometimes have overlapping codepoint ranges. + # Sometimes a later set is a smaller set filling in a gap + # in the range of a larger, preceding set. Sometimes it's + # the other way around. The best thing we can do is hardcode + # each case. + if patch_set_name == "Font Awesome": + # The Font Awesome range has a gap matching the + # prededing Progress Indicators range. + print(f"Info: Not overwriting existing codepoint {hex(cp_font)}") + continue + elif patch_set_name == "Octicons": + # The fourth Octicons range overlaps with the first. + print(f"Info: Overwriting existing codepoint {hex(cp_font)}") + else: + raise ValueError( + f"Unknown case of overlap for codepoint {hex(cp_font)} in patch set '{patch_set_name}'" + ) + if cp_rule in attributes: + patch_set_entries[cp_font] = attributes[cp_rule].copy() + else: + patch_set_entries[cp_font] = attributes["default"].copy() - entries |= {k: v for k, v in attributes.items() if isinstance(k, int)} - - if entry["ScaleRules"] is not None and "ScaleGroups" in entry["ScaleRules"]: + if entry["ScaleRules"] is not None: + if "ScaleGroups" not in entry["ScaleRules"]: + raise ValueError( + f"Scale rule format {entry['ScaleRules']} not implemented." + ) for group in entry["ScaleRules"]["ScaleGroups"]: xMin = math.inf yMin = math.inf xMax = -math.inf yMax = -math.inf individual_bounds: dict[int, tuple[int, int, int, int]] = {} - for cp in group: - if cp not in cmap: + individual_advances: set[float] = set() + for cp_rule in group: + cp_font = cp_rule + cp_offset + if cp_font not in cmap: continue - glyph = glyphs[cmap[cp]] + glyph = glyphs[cmap[cp_font]] + individual_advances.add(glyph.width) bounds = BoundsPen(glyphSet=glyphs) glyph.draw(bounds) - individual_bounds[cp] = bounds.bounds + individual_bounds[cp_font] = bounds.bounds xMin = min(bounds.bounds[0], xMin) yMin = min(bounds.bounds[1], yMin) xMax = max(bounds.bounds[2], xMax) yMax = max(bounds.bounds[3], yMax) group_width = xMax - xMin group_height = yMax - yMin - for cp in group: - if cp not in cmap or cp not in entries: + group_is_monospace = (len(individual_bounds) > 1) and ( + len(individual_advances) == 1 + ) + for cp_rule in group: + cp_font = cp_rule + cp_offset + if ( + cp_font not in cmap + or cp_font not in patch_set_entries + # Codepoints may contribute to the bounding box of multiple groups, + # but should be scaled according to the first group they are found + # in. Hence, to avoid overwriting, we need to skip codepoints that + # have already been assigned a scale group. + or "relative_height" in patch_set_entries[cp_font] + ): continue - this_bounds = individual_bounds[cp] - this_width = this_bounds[2] - this_bounds[0] + this_bounds = individual_bounds[cp_font] this_height = this_bounds[3] - this_bounds[1] - entries[cp]["relative_width"] = this_width / group_width - entries[cp]["relative_height"] = this_height / group_height - entries[cp]["relative_x"] = (this_bounds[0] - xMin) / group_width - entries[cp]["relative_y"] = (this_bounds[1] - yMin) / group_height - - del entries[0] + patch_set_entries[cp_font]["relative_height"] = ( + this_height / group_height + ) + patch_set_entries[cp_font]["relative_y"] = ( + this_bounds[1] - yMin + ) / group_height + # Horizontal alignment should only be grouped if the group is monospace, + # that is, if all glyphs in the group have the same advance width. + if group_is_monospace: + this_width = this_bounds[2] - this_bounds[0] + patch_set_entries[cp_font]["relative_width"] = ( + this_width / group_width + ) + patch_set_entries[cp_font]["relative_x"] = ( + this_bounds[0] - xMin + ) / group_width + entries |= patch_set_entries # Group codepoints by attribute key grouped = defaultdict[AttributeHash, list[int]](list)