Add glyphs for editing keys

All from Material Design Icons.
This commit is contained in:
Jules Aguillon 2023-08-06 19:17:05 +02:00
parent eb56c80ffb
commit 1c59347cca
11 changed files with 41 additions and 13 deletions

View File

@ -278,10 +278,20 @@ final class KeyValue
return keyeventKey(String.valueOf((char)symbol), code, flags | FLAG_KEY_FONT); return keyeventKey(String.valueOf((char)symbol), code, flags | FLAG_KEY_FONT);
} }
private static KeyValue editingKey(String symbol, Editing action) private static KeyValue editingKey(String symbol, Editing action, int flags)
{ {
return new KeyValue(symbol, Kind.Editing, action.ordinal(), return new KeyValue(symbol, Kind.Editing, action.ordinal(),
FLAG_SPECIAL | FLAG_SECONDARY | FLAG_SMALLER_FONT); flags | FLAG_SPECIAL | FLAG_SECONDARY);
}
private static KeyValue editingKey(String symbol, Editing action)
{
return editingKey(symbol, action, FLAG_SMALLER_FONT);
}
private static KeyValue editingKey(int symbol, Editing action)
{
return editingKey(String.valueOf((char)symbol), action, FLAG_KEY_FONT);
} }
/** A key that do nothing but has a unique ID. */ /** A key that do nothing but has a unique ID. */
@ -433,17 +443,17 @@ final class KeyValue
case "zwj": return charKey("zwj", '\u200D', 0); // zero-width joiner (provides ligature) case "zwj": return charKey("zwj", '\u200D', 0); // zero-width joiner (provides ligature)
case "zwnj": return charKey("zwnj", '\u200C', 0); // zero-width non joiner (prevents unintended ligature) case "zwnj": return charKey("zwnj", '\u200C', 0); // zero-width non joiner (prevents unintended ligature)
case "copy": return editingKey("copy", Editing.COPY); case "copy": return editingKey(0xE030, Editing.COPY);
case "paste": return editingKey("paste", Editing.PASTE); case "paste": return editingKey(0xE032, Editing.PASTE);
case "cut": return editingKey("cut", Editing.CUT); case "cut": return editingKey(0xE031, Editing.CUT);
case "selectAll": return editingKey("s. all", Editing.SELECT_ALL); case "selectAll": return editingKey(0xE033, Editing.SELECT_ALL);
case "shareText": return editingKey("share", Editing.SHARE); case "shareText": return editingKey(0xE034, Editing.SHARE);
case "pasteAsPlainText": return editingKey("<paste>", Editing.PASTE_PLAIN); case "pasteAsPlainText": return editingKey(0xE035, Editing.PASTE_PLAIN);
case "undo": return editingKey("undo", Editing.UNDO); case "undo": return editingKey(0xE036, Editing.UNDO);
case "redo": return editingKey("redo", Editing.REDO); case "redo": return editingKey(0xE037, Editing.REDO);
case "replaceText": return editingKey("repl.", Editing.REPLACE); case "replaceText": return editingKey("repl", Editing.REPLACE);
case "textAssist": return editingKey("assist", Editing.ASSIST); case "textAssist": return editingKey(0xE038, Editing.ASSIST);
case "autofill": return editingKey("auto.", Editing.AUTOFILL); case "autofill": return editingKey("auto", Editing.AUTOFILL);
default: return makeStringKey(name); default: return makeStringKey(name);
} }
} }

2
srcs/special_font/30.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>content-copy</title><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" /></svg>

After

Width:  |  Height:  |  Size: 260 B

2
srcs/special_font/31.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>content-cut</title><path d="M19,3L13,9L15,11L22,4V3M12,12.5A0.5,0.5 0 0,1 11.5,12A0.5,0.5 0 0,1 12,11.5A0.5,0.5 0 0,1 12.5,12A0.5,0.5 0 0,1 12,12.5M6,20A2,2 0 0,1 4,18C4,16.89 4.9,16 6,16A2,2 0 0,1 8,18C8,19.11 7.1,20 6,20M6,8A2,2 0 0,1 4,6C4,4.89 4.9,4 6,4A2,2 0 0,1 8,6C8,7.11 7.1,8 6,8M9.64,7.64C9.87,7.14 10,6.59 10,6A4,4 0 0,0 6,2A4,4 0 0,0 2,6A4,4 0 0,0 6,10C6.59,10 7.14,9.87 7.64,9.64L10,12L7.64,14.36C7.14,14.13 6.59,14 6,14A4,4 0 0,0 2,18A4,4 0 0,0 6,22A4,4 0 0,0 10,18C10,17.41 9.87,16.86 9.64,16.36L12,14L19,21H22V20L9.64,7.64Z" /></svg>

After

Width:  |  Height:  |  Size: 648 B

2
srcs/special_font/32.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>content-paste</title><path d="M19,20H5V4H7V7H17V4H19M12,2A1,1 0 0,1 13,3A1,1 0 0,1 12,4A1,1 0 0,1 11,3A1,1 0 0,1 12,2M19,2H14.82C14.4,0.84 13.3,0 12,0C10.7,0 9.6,0.84 9.18,2H5A2,2 0 0,0 3,4V20A2,2 0 0,0 5,22H19A2,2 0 0,0 21,20V4A2,2 0 0,0 19,2Z" /></svg>

After

Width:  |  Height:  |  Size: 353 B

2
srcs/special_font/33.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>select-all</title><path d="M9,9H15V15H9M7,17H17V7H7M15,5H17V3H15M15,21H17V19H15M19,17H21V15H19M19,9H21V7H19M19,21A2,2 0 0,0 21,19H19M19,13H21V11H19M11,21H13V19H11M9,3H7V5H9M3,17H5V15H3M5,21V19H3A2,2 0 0,0 5,21M19,3V5H21A2,2 0 0,0 19,3M13,3H11V5H13M3,9H5V7H3M7,21H9V19H7M3,13H5V11H3M3,5H5V3A2,2 0 0,0 3,5Z" /></svg>

After

Width:  |  Height:  |  Size: 413 B

2
srcs/special_font/34.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>share</title><path d="M21,12L14,5V9C7,10 4,15 3,20C5.5,16.5 9,14.9 14,14.9V19L21,12Z" /></svg>

After

Width:  |  Height:  |  Size: 193 B

2
srcs/special_font/35.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>clipboard-multiple-outline</title><path d="M4 7V21H18V23H4C2.9 23 2 22.1 2 21V7H4M20 3C21.1 3 22 3.9 22 5V17C22 18.1 21.1 19 20 19H8C6.9 19 6 18.1 6 17V5C6 3.9 6.9 3 8 3H11.18C11.6 1.84 12.7 1 14 1C15.3 1 16.4 1.84 16.82 3H20M14 3C13.45 3 13 3.45 13 4C13 4.55 13.45 5 14 5C14.55 5 15 4.55 15 4C15 3.45 14.55 3 14 3M10 7V5H8V17H20V5H18V7H10Z" /></svg>

After

Width:  |  Height:  |  Size: 449 B

2
srcs/special_font/36.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>undo-variant</title><path d="M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z" /></svg>

After

Width:  |  Height:  |  Size: 315 B

2
srcs/special_font/37.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>redo-variant</title><path d="M10.5,7A6.5,6.5 0 0,0 4,13.5A6.5,6.5 0 0,0 10.5,20H14V18H10.5C8,18 6,16 6,13.5C6,11 8,9 10.5,9H16.17L13.09,12.09L14.5,13.5L20,8L14.5,2.5L13.08,3.91L16.17,7H10.5M18,18H16V20H18V18Z" /></svg>

After

Width:  |  Height:  |  Size: 317 B

2
srcs/special_font/38.svg Normal file
View File

@ -0,0 +1,2 @@
<!-- Material Design Icons -->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>assistant</title><path d="M19,2H5A2,2 0 0,0 3,4V18A2,2 0 0,0 5,20H9L12,23L15,20H19A2,2 0 0,0 21,18V4A2,2 0 0,0 19,2M13.88,12.88L12,17L10.12,12.88L6,11L10.12,9.12L12,5L13.88,9.12L18,11" /></svg>

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.