Skip to content

Commit a3e938b

Browse files
committed
Adjust built-in font sizes to ensure better vertical alignment
1 parent e648635 commit a3e938b

12 files changed

+700
-697
lines changed

boards/BANGLEJS2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@
6969
'DEFINES += -DESPR_NO_LINE_NUMBERS=1', # we execute mainly from flash, so line numbers can be worked out
7070
'INCLUDE += -I$(ROOT)/libs/banglejs -I$(ROOT)/libs/misc',
7171
'WRAPPERSOURCES += libs/banglejs/jswrap_bangle.c',
72-
'WRAPPERSOURCES += libs/graphics/jswrap_font_15.c',
73-
'WRAPPERSOURCES += libs/graphics/jswrap_font_19.c',
72+
'WRAPPERSOURCES += libs/graphics/jswrap_font_14.c',
73+
'WRAPPERSOURCES += libs/graphics/jswrap_font_17.c',
7474
'WRAPPERSOURCES += libs/graphics/jswrap_font_22.c',
75-
'WRAPPERSOURCES += libs/graphics/jswrap_font_30.c',
75+
'WRAPPERSOURCES += libs/graphics/jswrap_font_28.c',
7676
'WRAPPERSOURCES += libs/graphics/jswrap_font_6x15.c',
7777
'WRAPPERSOURCES += libs/graphics/jswrap_font_12x20.c',
7878
'SOURCES += libs/misc/nmea.c',

libs/graphics/font/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ The vector font is stored in `fontmap_13x19.svg` and is decoded with `build_vect
3232
These fonts are used by Bangle.js 2. These are turned into Espruino files (embedded `pbf` fonts) with the following commands:
3333

3434
```
35-
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_28.pbff --range All --height 22 --shiftUp 10 --nudge --debug --spaceWidth 4 --opbfc 22
36-
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_24_bold.pbff --range All --height 19 --shiftUp 8 --nudge --debug --spaceWidth 3 --opbfc 19
37-
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_18_bold.pbff --range All --height 15 --shiftUp 7 --nudge --debug --spaceWidth 3 --opbfc 15
38-
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_18_doubled.pbff --range All --height 30 --spaceWidth 6 --opbfc 30
35+
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_28.pbff --range All --height 22 --shiftUp 10 --nudge --debug --spaceWidth 4 --opbfc 22 --test "Hello World"
36+
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_24_bold.pbff --range All --height 17 --shiftUp 10 --nudge --debug --spaceWidth 3 --opbfc 17 --test "Hello World"
37+
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_18_bold.pbff --range All --height 14 --shiftUp 7 --nudge --debug --spaceWidth 3 --opbfc 14 --test "Hello World"
38+
node ~/workspace/EspruinoWebTools/cli/fontconverter.js renaissance_18_doubled.pbff --range All --height 28 --spaceWidth 6 --opbfc 28 --test "Hello World"
3939
```
4040

4141
`renaissance_18_doubled.pbff` was originally created with:

libs/graphics/jswrap_font_15.c libs/graphics/jswrap_font_14.c

+142-141
Large diffs are not rendered by default.

libs/graphics/jswrap_font_15.h libs/graphics/jswrap_font_14.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*
1010
* ----------------------------------------------------------------------------
11-
* Generated by EspruinoWebTools/cli/fontconverter.js /home/gw/workspace/EspruinoCode/fonts/renaissance/files/renaissance_18_bold.pbff --range All --height 15 --shiftUp 7 --nudge --debug --spaceWidth 3 --opbfc 15
11+
* Generated by EspruinoWebTools/cli/fontconverter.js renaissance_18_bold.pbff --range All --height 14 --shiftUp 7 --nudge --debug --spaceWidth 3 --opbfc 14 --test Hello World
1212
*
1313
* Contains Custom Fonts
1414
* ----------------------------------------------------------------------------
1515
*/
1616

1717
#include "jsvar.h"
1818

19-
JsVar *jswrap_graphics_setFont15(JsVar *parent, int scale);
19+
JsVar *jswrap_graphics_setFont14(JsVar *parent, int scale);

libs/graphics/jswrap_font_17.c

+406
Large diffs are not rendered by default.

libs/graphics/jswrap_font_19.h libs/graphics/jswrap_font_17.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*
1010
* ----------------------------------------------------------------------------
11-
* Generated by EspruinoWebTools/cli/fontconverter.js /home/gw/workspace/EspruinoCode/fonts/renaissance/files/renaissance_24_bold.pbff --range All --height 19 --shiftUp 8 --nudge --debug --spaceWidth 3 --opbfc 19
11+
* Generated by EspruinoWebTools/cli/fontconverter.js renaissance_24_bold.pbff --range All --height 17 --shiftUp 10 --nudge --debug --spaceWidth 3 --opbfc 17 --test Hello World
1212
*
1313
* Contains Custom Fonts
1414
* ----------------------------------------------------------------------------
1515
*/
1616

1717
#include "jsvar.h"
1818

19-
JsVar *jswrap_graphics_setFont19(JsVar *parent, int scale);
19+
JsVar *jswrap_graphics_setFont17(JsVar *parent, int scale);

libs/graphics/jswrap_font_19.c

-404
This file was deleted.

libs/graphics/jswrap_font_22.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* ----------------------------------------------------------------------------
1111
* This file is designed to be parsed during the build process
1212
*
13-
* Generated by EspruinoWebTools/cli/fontconverter.js /home/gw/workspace/EspruinoCode/fonts/renaissance/files/renaissance_28.pbff --range All --height 22 --shiftUp 10 --nudge --debug --spaceWidth 4 --opbfc 22
13+
* Generated by EspruinoWebTools/cli/fontconverter.js renaissance_28.pbff --range All --height 22 --shiftUp 10 --nudge --debug --spaceWidth 4 --opbfc 22 --test Hello World
1414
*
1515
* Contains Custom Fonts
1616
* ----------------------------------------------------------------------------

libs/graphics/jswrap_font_22.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
99
*
1010
* ----------------------------------------------------------------------------
11-
* Generated by EspruinoWebTools/cli/fontconverter.js /home/gw/workspace/EspruinoCode/fonts/renaissance/files/renaissance_28.pbff --range All --height 22 --shiftUp 10 --nudge --debug --spaceWidth 4 --opbfc 22
11+
* Generated by EspruinoWebTools/cli/fontconverter.js renaissance_28.pbff --range All --height 22 --shiftUp 10 --nudge --debug --spaceWidth 4 --opbfc 22 --test Hello World
1212
*
1313
* Contains Custom Fonts
1414
* ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)