11 Commits

Author SHA1 Message Date
Ben Whittaker
21d8c727a7 Remove half-pixel offset from fillPoly
This makes the results of fillPoly align with those of drawPoly when
both are fed whole-pixel coordinates.

For applications where it makes a noticeable difference the offset can
be added manually before calling fillPoly, which is what the vector
font rendering code now does.
2020-06-09 19:12:39 -04:00
Ben Whittaker
960bf6a522 Add lowercase eth (ð) to vector font 2020-06-06 00:40:27 -04:00
Ben Whittaker
1152a7bfd2 Change how vector font is stored
Instead of storing everything in a single array delimited by magic
values, have separate arrays containing
- vertices for each polygon
- # of vertices for each polygon
- polygon indices for each char
- # of polygon indices for each char

This arrangement means that multiple char can use reference the same
polygons. build_vector_font.js takes advantage of this by
normalizing and deduplicated polygons where it can.

Shaves exactly one kilobyte from the final build.
2020-06-04 20:54:17 -04:00
Ben Whittaker
2f44530005 Include accented characters directly in fontmap 2020-06-01 19:52:01 -04:00
Ben Whittaker
49abcde91e Include chars 247-254 in vector_font.c 2020-06-01 00:56:29 -04:00
Ben Whittaker
7b84690744 Reduce number of polygons in vector font
Now that https://github.com/espruino/Espruino/issues/1796 is fixed, a
lot of polygons can be merged together. Should save about 300 bytes.
2020-06-01 00:53:49 -04:00
Gordon Williams
808f7afae9 Added updated font map with more symbols 2020-05-23 14:12:49 +01:00
Gordon Williams
feb45fe737 Fix new vector font - accidentally committed one with too few points
Graphics.fillPoly now uses 4 bit fixed point internally
2020-05-21 09:06:17 +01:00
Gordon Williams
8ff3977586 Minor font tweaks, add changelog 2020-05-20 13:48:55 +01:00
Gordon Williams
fdc1b81cbc Vector font with many ISO 8859-1 characters now included 2020-05-20 10:44:18 +01:00
Gordon Williams
826c093b73 First commit of new vector font - still need to fix the size scaling 2020-05-19 16:30:05 +01:00