diff --git a/Makefile b/Makefile index a213088..bfb633b 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ installd: _build/$(PACKAGE_NAME).debug.apk clean: rm -rf _build/*.dex _build/class _build/gen _build/*.apk _build/*.unsigned-apk \ - _build/*.idsig + _build/*.idsig _build/assets .PHONY: release debug installd clean @@ -97,13 +97,12 @@ $(R_FILE): $(RES_FILES) $(MANIFEST_FILE) # Special font -SPECIAL_FONT_BASE_FONT = srcs/special_font/base_font.ttf SPECIAL_FONT_GLYPHS = $(wildcard srcs/special_font/*.svg) SPECIAL_FONT_SCRIPT = srcs/special_font/build.pe -_build/assets/special_font.ttf: $(SPECIAL_FONT_SCRIPT) $(SPECIAL_FONT_BASE_FONT) $(SPECIAL_FONT_GLYPHS) +_build/assets/special_font.ttf: $(SPECIAL_FONT_SCRIPT) $(SPECIAL_FONT_GLYPHS) mkdir -p $(@D) - fontforge -lang=ff -script $(SPECIAL_FONT_SCRIPT) $@ $(SPECIAL_FONT_BASE_FONT) $(SPECIAL_FONT_GLYPHS) + fontforge -lang=ff -script $(SPECIAL_FONT_SCRIPT) $@ $(SPECIAL_FONT_GLYPHS) # Compile java classes and build classes.dex diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java index 9c0c080..83b9862 100644 --- a/srcs/juloo.keyboard2/KeyValue.java +++ b/srcs/juloo.keyboard2/KeyValue.java @@ -152,7 +152,7 @@ class KeyValue static { - addModifierKey("shift", "\uE808", + addModifierKey("shift", "\n", // Can't write u000A because Java is stupid FLAG_SHIFT | FLAG_KEY_FONT | FLAG_SMALLER_FONT); addModifierKey("ctrl", "Ctrl", FLAG_CTRL | FLAG_SMALLER_FONT); addModifierKey("alt", "Alt", FLAG_ALT | FLAG_SMALLER_FONT); @@ -233,19 +233,19 @@ class KeyValue addSpecialKey("switch_numeric", "123+", EVENT_SWITCH_NUMERIC); addSpecialKey("switch_emoji", "\u0001" , EVENT_SWITCH_EMOJI, FLAG_KEY_FONT | FLAG_SMALLER_FONT); addSpecialKey("switch_back_emoji", "ABC", EVENT_SWITCH_BACK_EMOJI); - addSpecialKey("change_method", "\ue807", EVENT_CHANGE_METHOD, FLAG_KEY_FONT | FLAG_SMALLER_FONT); + addSpecialKey("change_method", "\u0009", EVENT_CHANGE_METHOD, FLAG_KEY_FONT | FLAG_SMALLER_FONT); addSpecialKey("action", "Action", EVENT_ACTION, FLAG_SMALLER_FONT); // Will always be replaced addEventKey("esc", "Esc", KeyEvent.KEYCODE_ESCAPE, FLAG_SMALLER_FONT); - addEventKey("enter", "\ue800", KeyEvent.KEYCODE_ENTER, FLAG_KEY_FONT); - addEventKey("up", "\uE80B", KeyEvent.KEYCODE_DPAD_UP, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); - addEventKey("right", "\uE80C", KeyEvent.KEYCODE_DPAD_RIGHT, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); - addEventKey("down", "\uE809", KeyEvent.KEYCODE_DPAD_DOWN, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); - addEventKey("left", "\uE80A", KeyEvent.KEYCODE_DPAD_LEFT, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); + addEventKey("enter", "\u000E", KeyEvent.KEYCODE_ENTER, FLAG_KEY_FONT); + addEventKey("up", "\u0005", KeyEvent.KEYCODE_DPAD_UP, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); + addEventKey("right", "\u0006", KeyEvent.KEYCODE_DPAD_RIGHT, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); + addEventKey("down", "\u0007", KeyEvent.KEYCODE_DPAD_DOWN, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); + addEventKey("left", "\u0008", KeyEvent.KEYCODE_DPAD_LEFT, FLAG_KEY_FONT | FLAG_PRECISE_REPEAT); addEventKey("page_up", "\u0002", KeyEvent.KEYCODE_PAGE_UP, FLAG_KEY_FONT); addEventKey("page_down", "\u0003", KeyEvent.KEYCODE_PAGE_DOWN, FLAG_KEY_FONT); - addEventKey("home", "\uE80E", KeyEvent.KEYCODE_MOVE_HOME, FLAG_KEY_FONT); - addEventKey("end", "\uE80F", KeyEvent.KEYCODE_MOVE_END, FLAG_KEY_FONT); + addEventKey("home", "\u000B", KeyEvent.KEYCODE_MOVE_HOME, FLAG_KEY_FONT); + addEventKey("end", "\u000C", KeyEvent.KEYCODE_MOVE_END, FLAG_KEY_FONT); addEventKey("backspace", "⌫", KeyEvent.KEYCODE_DEL, FLAG_SMALLER_FONT); addEventKey("delete", "⌦", KeyEvent.KEYCODE_FORWARD_DEL, FLAG_SMALLER_FONT); addEventKey("insert", "Ins", KeyEvent.KEYCODE_INSERT, FLAG_SMALLER_FONT); @@ -262,6 +262,6 @@ class KeyValue addEventKey("tab", "↹", KeyEvent.KEYCODE_TAB); addKey("\\t", "\\t", '\t', EVENT_NONE, 0); // Send the tab character - addKey("space", "\ue80d", ' ', KeyEvent.KEYCODE_SPACE, FLAG_KEY_FONT | FLAG_SMALLER_FONT); + addKey("space", "\r", ' ', KeyEvent.KEYCODE_SPACE, FLAG_KEY_FONT | FLAG_SMALLER_FONT); } } diff --git a/srcs/special_font/05.svg b/srcs/special_font/05.svg new file mode 100644 index 0000000..cdec868 --- /dev/null +++ b/srcs/special_font/05.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/06.svg b/srcs/special_font/06.svg new file mode 100644 index 0000000..af11f53 --- /dev/null +++ b/srcs/special_font/06.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/07.svg b/srcs/special_font/07.svg new file mode 100644 index 0000000..cccba2a --- /dev/null +++ b/srcs/special_font/07.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/08.svg b/srcs/special_font/08.svg new file mode 100644 index 0000000..58827da --- /dev/null +++ b/srcs/special_font/08.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/09.svg b/srcs/special_font/09.svg new file mode 100644 index 0000000..049cc30 --- /dev/null +++ b/srcs/special_font/09.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/srcs/special_font/0A.svg b/srcs/special_font/0A.svg new file mode 100644 index 0000000..350ba63 --- /dev/null +++ b/srcs/special_font/0A.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/srcs/special_font/0B.svg b/srcs/special_font/0B.svg new file mode 100644 index 0000000..dc359c4 --- /dev/null +++ b/srcs/special_font/0B.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/0C.svg b/srcs/special_font/0C.svg new file mode 100644 index 0000000..c46ad76 --- /dev/null +++ b/srcs/special_font/0C.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/0D.svg b/srcs/special_font/0D.svg new file mode 100644 index 0000000..7c6afbe --- /dev/null +++ b/srcs/special_font/0D.svg @@ -0,0 +1,3 @@ + + + diff --git a/srcs/special_font/0E.svg b/srcs/special_font/0E.svg new file mode 100644 index 0000000..499c2c8 --- /dev/null +++ b/srcs/special_font/0E.svg @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/srcs/special_font/base_font.ttf b/srcs/special_font/base_font.ttf deleted file mode 100644 index 2bfd130..0000000 Binary files a/srcs/special_font/base_font.ttf and /dev/null differ diff --git a/srcs/special_font/build.pe b/srcs/special_font/build.pe index fab828b..de5ed23 100644 --- a/srcs/special_font/build.pe +++ b/srcs/special_font/build.pe @@ -1,13 +1,11 @@ # The special font is used for the symbols of some keys. It is built from SVG # files, one for each glyph. - -# Starts from an existing font file for glyphs that don't have SVG sources yet. -Open($2) +New() # Imports glyphs, file name is position in the font. -i = 3 +i = 2 while (i < $argc) - Select(Strtol($argv[i]:t:r)) + Select(Strtol($argv[i]:t:r, 16)) Import($argv[i]) i++ endloop