Skip to content

Commit 83b3d02

Browse files
committed
generate-css: Add codepoint to glyphnames.json
[why] Just having the characters themselves as data for the name is convenient in some cases; but sometimes the codepoint is also nice. And it certainly improves the human interaction / check of the file. [how] Include the character and the codepoint in the glyph-name data. This is a breaking change. But given that the json file is rather new I believe we can get away with it. Sorry for the inconvenience for all the early adaptors that already use the old/previous format. But now we are more future proof and can add even more data without breaking old json code. Related: #1140 kovidgoyal/kitty#2972 chrisbra/unicode.vim#39 #448 nvim-tree/nvim-web-devicons#192 Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
1 parent 7e2d38b commit 83b3d02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/scripts/generate-css.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ for var in "${!i@}"; do
108108

109109
# generate json entry
110110
{
111-
printf ",\"%s\":\"%s\"" "$glyph_name" "$glyph_char"
111+
printf ",\"%s\":{\"char\":\"%s\",\"code\":\"%s\"}" "$glyph_name" "$glyph_char" "$glyph_code"
112112
} >> "$output_json_file"
113113

114114
done

0 commit comments

Comments
 (0)