Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Øyvind Kolås
firmware
Commits
724c884b
Commit
724c884b
authored
Nov 24, 2020
by
Øyvind Kolås
Browse files
(feat:ctx) integrate ctx, a 2D vector rasterizer
parent
1f897860
Changes
10
Hide whitespace changes
Inline
Side-by-side
epicardium/epicardium.h
View file @
724c884b
...
...
@@ -56,6 +56,7 @@ typedef _Bool bool;
#define API_DISP_FRAMEBUFFER 0x29
#define API_DISP_BACKLIGHT 0x2a
#define API_DISP_PRINT_ADV 0x2b
#define API_DISP_CTX 0x2c
/* API_BATTERY_VOLTAGE 0x30 */
#define API_BATTERY_CURRENT 0x31
...
...
@@ -1612,6 +1613,17 @@ API(API_DISP_FRAMEBUFFER, int epic_disp_framebuffer(
union
disp_framebuffer
*
fb
));
/**
* Render a ctx drawlist. The drawlist is expected to consist of complete
* commands, i.e. not only a multiple of 9 bytes, but to not chop of CTX_CONT
* entries. The function is blocking and reads data from core1s memory
* space.
*
* :data: pointer to journal data
* :length: length of journal data, in bytes.
* :return: ``0`` on success or negative value in case of an error:
*/
API
(
API_DISP_CTX
,
int
epic_disp_ctx
(
void
*
data
,
size_t
length
));
/**
* Set the backlight brightness.
...
...
epicardium/modules/display.c
View file @
724c884b
...
...
@@ -4,6 +4,7 @@
#include "LCD_Driver.h"
#include "epicardium.h"
#include "gfx.h"
#include "ctx.h"
#include "gpio.h"
#include "task.h"
#include "tmr.h"
...
...
@@ -183,11 +184,11 @@ int epic_disp_update()
if
(
cl
<
0
)
{
return
cl
;
}
gfx_update
(
&
display_screen
);
return
0
;
}
int
epic_disp_framebuffer
(
union
disp_framebuffer
*
fb
)
{
int
cl
=
check_lock
();
...
...
@@ -199,6 +200,39 @@ int epic_disp_framebuffer(union disp_framebuffer *fb)
return
0
;
}
static
Ctx
*
ctx
=
NULL
;
int
epic_disp_ctx
(
void
*
data
,
size_t
length
)
{
if
(
!
data
||
(
length
%
9
!=
0
))
return
-
EINVAL
;
if
(
!
ctx
)
{
ctx
=
ctx_new_for_framebuffer
(
display_screen
.
fb
->
data
,
DISP_WIDTH
,
DISP_HEIGHT
,
DISP_WIDTH
*
2
,
CTX_FORMAT_RGB565_BYTESWAPPED
);
#if 1 // rotate framebuffer
//ctx_identity (ctx);
ctx_translate
(
ctx
,
DISP_WIDTH
,
DISP_HEIGHT
);
ctx_scale
(
ctx
,
-
1
.
0
,
-
1
.
0
);
#endif
}
Ctx
*
sctx
=
ctx_new_for_renderstream
(
data
,
length
);
//ctx_save (ctx);
ctx_render_ctx
(
sctx
,
ctx
);
//ctx_restore (ctx);
ctx_free
(
sctx
);
#if 0 // in-lieu of better way of ensuring clean slate
ctx_free (ctx);
ctx = NULL;
#endif
return
0
;
}
int
epic_disp_backlight
(
uint16_t
brightness
)
{
/* TODO: lock? */
...
...
lib/card10/meson.build
View file @
724c884b
...
...
@@ -18,6 +18,7 @@ deps = [
bme680,
board_card10,
libgfx,
libctx,
max77650,
max86150,
periphdriver,
...
...
lib/ctx/ctx-font-ascii-spacing.h
0 → 100644
View file @
724c884b
#ifndef CTX_FONT_ascii
/* this is a ctx encoded font based on DejaVuSans.ttf */
/* CTX_SUBDIV:4 CTX_BAKE_FONT_SIZE:160 */
/* glyphs covered:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
jklmnopqrstuvwxyz{|}~ */
static
const
struct
__attribute__
((
packed
))
{
uint8_t
code
;
uint32_t
a
;
uint32_t
b
;}
ctx_font_ascii
[]
=
{
{
'@'
,
0x00000020
,
0x00002bb0
},
/* x-advance: 43.687500 */
{
'@'
,
0x00000021
,
0x00003719
},
/* ! x-advance: 55.097656 */
{
'@'
,
0x00000022
,
0x00003f38
},
/* " x-advance: 63.218750 */
{
'@'
,
0x00000023
,
0x0000732a
},
/* # x-advance: 115.164062 */
{
'@'
,
0x00000024
,
0x00005773
},
/* $ x-advance: 87.449219 */
{
'@'
,
0x00000025
,
0x0000829a
},
/* % x-advance: 130.601562 */
{
'@'
,
0x00000026
,
0x00006b2e
},
/* & x-advance: 107.179688 */
{
'@'
,
0x00000027
,
0x000025c9
},
/* ' x-advance: 37.785156 */
{
'@'
,
0x00000028
,
0x0000359f
},
/* ( x-advance: 53.621094 */
{
'@'
,
0x00000029
,
0x0000359f
},
/* ) x-advance: 53.621094 */
{
'@'
,
0x0000002a
,
0x000044b9
},
/* * x-advance: 68.722656 */
{
'@'
,
0x0000002b
,
0x0000732a
},
/* + x-advance: 115.164062 */
{
'@'
,
0x0000002c
,
0x00002bb0
},
/* , x-advance: 43.687500 */
{
'@'
,
0x0000002d
,
0x00003198
},
/* - x-advance: 49.593750 */
{
'@'
,
0x0000002e
,
0x00002bb0
},
/* . x-advance: 43.687500 */
{
'@'
,
0x0000002f
,
0x00002e4f
},
/* / x-advance: 46.308594 */
{
'@'
,
0x00000030
,
0x00005773
},
/* 0 x-advance: 87.449219 */
{
'@'
,
0x00000031
,
0x00005773
},
/* 1 x-advance: 87.449219 */
{
'@'
,
0x00000032
,
0x00005773
},
/* 2 x-advance: 87.449219 */
{
'@'
,
0x00000033
,
0x00005773
},
/* 3 x-advance: 87.449219 */
{
'@'
,
0x00000034
,
0x00005773
},
/* 4 x-advance: 87.449219 */
{
'@'
,
0x00000035
,
0x00005773
},
/* 5 x-advance: 87.449219 */
{
'@'
,
0x00000036
,
0x00005773
},
/* 6 x-advance: 87.449219 */
{
'@'
,
0x00000037
,
0x00005773
},
/* 7 x-advance: 87.449219 */
{
'@'
,
0x00000038
,
0x00005773
},
/* 8 x-advance: 87.449219 */
{
'@'
,
0x00000039
,
0x00005773
},
/* 9 x-advance: 87.449219 */
{
'@'
,
0x0000003a
,
0x00002e4f
},
/* : x-advance: 46.308594 */
{
'@'
,
0x0000003b
,
0x00002e4f
},
/* ; x-advance: 46.308594 */
{
'@'
,
0x0000003c
,
0x0000732a
},
/* < x-advance: 115.164062 */
{
'@'
,
0x0000003d
,
0x0000732a
},
/* = x-advance: 115.164062 */
{
'@'
,
0x0000003e
,
0x0000732a
},
/* > x-advance: 115.164062 */
{
'@'
,
0x0000003f
,
0x000048f3
},
/* ? x-advance: 72.949219 */
{
'@'
,
0x00000040
,
0x00008973
},
/* @ x-advance: 137.449219 */
{
'@'
,
0x00000041
,
0x00005e06
},
/* A x-advance: 94.023438 */
{
'@'
,
0x00000042
,
0x00005e4b
},
/* B x-advance: 94.292969 */
{
'@'
,
0x00000043
,
0x00005ff9
},
/* C x-advance: 95.972656 */
{
'@'
,
0x00000044
,
0x000069d6
},
/* D x-advance: 105.835938 */
{
'@'
,
0x00000045
,
0x000056d8
},
/* E x-advance: 86.843750 */
{
'@'
,
0x00000046
,
0x00004f0f
},
/* F x-advance: 79.058594 */
{
'@'
,
0x00000047
,
0x00006a82
},
/* G x-advance: 106.507812 */
{
'@'
,
0x00000048
,
0x0000675b
},
/* H x-advance: 103.355469 */
{
'@'
,
0x00000049
,
0x00002889
},
/* I x-advance: 40.535156 */
{
'@'
,
0x0000004a
,
0x00002889
},
/* J x-advance: 40.535156 */
{
'@'
,
0x0000004b
,
0x00005a22
},
/* K x-advance: 90.132812 */
{
'@'
,
0x0000004c
,
0x00004c93
},
/* L x-advance: 76.574219 */
{
'@'
,
0x0000004d
,
0x00007697
},
/* M x-advance: 118.589844 */
{
'@'
,
0x0000004e
,
0x000066d1
},
/* N x-advance: 102.816406 */
{
'@'
,
0x0000004f
,
0x00006c30
},
/* O x-advance: 108.187500 */
{
'@'
,
0x00000050
,
0x000052e2
},
/* P x-advance: 82.882812 */
{
'@'
,
0x00000051
,
0x00006c30
},
/* Q x-advance: 108.187500 */
{
'@'
,
0x00000052
,
0x00005f80
},
/* R x-advance: 95.500000 */
{
'@'
,
0x00000053
,
0x0000573f
},
/* S x-advance: 87.246094 */
{
'@'
,
0x00000054
,
0x000053f5
},
/* T x-advance: 83.957031 */
{
'@'
,
0x00000055
,
0x0000649a
},
/* U x-advance: 100.601562 */
{
'@'
,
0x00000056
,
0x00005e06
},
/* V x-advance: 94.023438 */
{
'@'
,
0x00000057
,
0x000087e7
},
/* W x-advance: 135.902344 */
{
'@'
,
0x00000058
,
0x00005e29
},
/* X x-advance: 94.160156 */
{
'@'
,
0x00000059
,
0x000053f5
},
/* Y x-advance: 83.957031 */
{
'@'
,
0x0000005a
,
0x00005e29
},
/* Z x-advance: 94.160156 */
{
'@'
,
0x0000005b
,
0x0000359f
},
/* [ x-advance: 53.621094 */
{
'@'
,
0x0000005c
,
0x00002e4f
},
/* \ x-advance: 46.308594 */
{
'@'
,
0x0000005d
,
0x0000359f
},
/* ] x-advance: 53.621094 */
{
'@'
,
0x0000005e
,
0x0000732a
},
/* ^ x-advance: 115.164062 */
{
'@'
,
0x0000005f
,
0x000044b9
},
/* _ x-advance: 68.722656 */
{
'@'
,
0x00000060
,
0x000044b9
},
/* ` x-advance: 68.722656 */
{
'@'
,
0x00000061
,
0x0000543a
},
/* a x-advance: 84.226562 */
{
'@'
,
0x00000062
,
0x0000573f
},
/* b x-advance: 87.246094 */
{
'@'
,
0x00000063
,
0x00004b92
},
/* c x-advance: 75.570312 */
{
'@'
,
0x00000064
,
0x0000573f
},
/* d x-advance: 87.246094 */
{
'@'
,
0x00000065
,
0x00005490
},
/* e x-advance: 84.562500 */
{
'@'
,
0x00000066
,
0x00003063
},
/* f x-advance: 48.386719 */
{
'@'
,
0x00000067
,
0x0000573f
},
/* g x-advance: 87.246094 */
{
'@'
,
0x00000068
,
0x0000571d
},
/* h x-advance: 87.113281 */
{
'@'
,
0x00000069
,
0x00002630
},
/* i x-advance: 38.187500 */
{
'@'
,
0x0000006a
,
0x00002630
},
/* j x-advance: 38.187500 */
{
'@'
,
0x0000006b
,
0x00004f98
},
/* k x-advance: 79.593750 */
{
'@'
,
0x0000006c
,
0x00002630
},
/* l x-advance: 38.187500 */
{
'@'
,
0x0000006d
,
0x000085e4
},
/* m x-advance: 133.890625 */
{
'@'
,
0x0000006e
,
0x0000571d
},
/* n x-advance: 87.113281 */
{
'@'
,
0x0000006f
,
0x00005418
},
/* o x-advance: 84.093750 */
{
'@'
,
0x00000070
,
0x0000573f
},
/* p x-advance: 87.246094 */
{
'@'
,
0x00000071
,
0x0000573f
},
/* q x-advance: 87.246094 */
{
'@'
,
0x00000072
,
0x00003882
},
/* r x-advance: 56.507812 */
{
'@'
,
0x00000073
,
0x0000479c
},
/* s x-advance: 71.609375 */
{
'@'
,
0x00000074
,
0x000035e4
},
/* t x-advance: 53.890625 */
{
'@'
,
0x00000075
,
0x0000571d
},
/* u x-advance: 87.113281 */
{
'@'
,
0x00000076
,
0x00005157
},
/* v x-advance: 81.339844 */
{
'@'
,
0x00000077
,
0x0000706a
},
/* w x-advance: 112.414062 */
{
'@'
,
0x00000078
,
0x00005157
},
/* x x-advance: 81.339844 */
{
'@'
,
0x00000079
,
0x00005157
},
/* y x-advance: 81.339844 */
{
'@'
,
0x0000007a
,
0x00004825
},
/* z x-advance: 72.144531 */
{
'@'
,
0x0000007b
,
0x00005773
},
/* { x-advance: 87.449219 */
{
'@'
,
0x0000007c
,
0x00002e4f
},
/* | x-advance: 46.308594 */
{
'@'
,
0x0000007d
,
0x00005773
},
/* } x-advance: 87.449219 */
{
'@'
,
0x0000007e
,
0x0000732a
},
/* ~ x-advance: 115.164062 */
};
#define CTX_FONT_ascii 1
#endif
lib/ctx/ctx-font-regular-spacing.h
0 → 100644
View file @
724c884b
#ifndef CTX_FONT_regular
/* this is a ctx encoded font based on DejaVuSans.ttf */
/* CTX_SUBDIV:4 CTX_BAKE_FONT_SIZE:160 */
/* glyphs covered:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
jklmnopqrstuvwxyz{|}~éñÑßæøåö£ÆÖØÅ€§π°üÜ…”“«»©®™⏎⌫⌨·←↑↓→☣☀☁☂☢☭☮☯☽✉⚙⚠␣²◆♥♦♣
♠▲▼÷≈±≥≤½¼╴−╶╵╷┛┓┣╋┳┻┫┗┏┃━⎢⎥ */
static
const
struct
__attribute__
((
packed
))
{
uint8_t
code
;
uint32_t
a
;
uint32_t
b
;}
ctx_font_regular
[]
=
{
{
'@'
,
0x00000020
,
0x00002bb0
},
/* x-advance: 43.687500 */
{
'@'
,
0x00000021
,
0x00003719
},
/* ! x-advance: 55.097656 */
{
'@'
,
0x00000022
,
0x00003f38
},
/* " x-advance: 63.218750 */
{
'@'
,
0x00000023
,
0x0000732a
},
/* # x-advance: 115.164062 */
{
'@'
,
0x00000024
,
0x00005773
},
/* $ x-advance: 87.449219 */
{
'@'
,
0x00000025
,
0x0000829a
},
/* % x-advance: 130.601562 */
{
'@'
,
0x00000026
,
0x00006b2e
},
/* & x-advance: 107.179688 */
{
'@'
,
0x00000027
,
0x000025c9
},
/* ' x-advance: 37.785156 */
{
'@'
,
0x00000028
,
0x0000359f
},
/* ( x-advance: 53.621094 */
{
'@'
,
0x00000029
,
0x0000359f
},
/* ) x-advance: 53.621094 */
{
'@'
,
0x0000002a
,
0x000044b9
},
/* * x-advance: 68.722656 */
{
'@'
,
0x0000002b
,
0x0000732a
},
/* + x-advance: 115.164062 */
{
'@'
,
0x0000002c
,
0x00002bb0
},
/* , x-advance: 43.687500 */
{
'@'
,
0x0000002d
,
0x00003198
},
/* - x-advance: 49.593750 */
{
'@'
,
0x0000002e
,
0x00002bb0
},
/* . x-advance: 43.687500 */
{
'@'
,
0x0000002f
,
0x00002e4f
},
/* / x-advance: 46.308594 */
{
'@'
,
0x00000030
,
0x00005773
},
/* 0 x-advance: 87.449219 */
{
'@'
,
0x00000031
,
0x00005773
},
/* 1 x-advance: 87.449219 */
{
'@'
,
0x00000032
,
0x00005773
},
/* 2 x-advance: 87.449219 */
{
'@'
,
0x00000033
,
0x00005773
},
/* 3 x-advance: 87.449219 */
{
'@'
,
0x00000034
,
0x00005773
},
/* 4 x-advance: 87.449219 */
{
'@'
,
0x00000035
,
0x00005773
},
/* 5 x-advance: 87.449219 */
{
'@'
,
0x00000036
,
0x00005773
},
/* 6 x-advance: 87.449219 */
{
'@'
,
0x00000037
,
0x00005773
},
/* 7 x-advance: 87.449219 */
{
'@'
,
0x00000038
,
0x00005773
},
/* 8 x-advance: 87.449219 */
{
'@'
,
0x00000039
,
0x00005773
},
/* 9 x-advance: 87.449219 */
{
'@'
,
0x0000003a
,
0x00002e4f
},
/* : x-advance: 46.308594 */
{
'@'
,
0x0000003b
,
0x00002e4f
},
/* ; x-advance: 46.308594 */
{
'@'
,
0x0000003c
,
0x0000732a
},
/* < x-advance: 115.164062 */
{
'@'
,
0x0000003d
,
0x0000732a
},
/* = x-advance: 115.164062 */
{
'@'
,
0x0000003e
,
0x0000732a
},
/* > x-advance: 115.164062 */
{
'@'
,
0x0000003f
,
0x000048f3
},
/* ? x-advance: 72.949219 */
{
'@'
,
0x00000040
,
0x00008973
},
/* @ x-advance: 137.449219 */
{
'@'
,
0x00000041
,
0x00005e06
},
/* A x-advance: 94.023438 */
{
'@'
,
0x00000042
,
0x00005e4b
},
/* B x-advance: 94.292969 */
{
'@'
,
0x00000043
,
0x00005ff9
},
/* C x-advance: 95.972656 */
{
'@'
,
0x00000044
,
0x000069d6
},
/* D x-advance: 105.835938 */
{
'@'
,
0x00000045
,
0x000056d8
},
/* E x-advance: 86.843750 */
{
'@'
,
0x00000046
,
0x00004f0f
},
/* F x-advance: 79.058594 */
{
'@'
,
0x00000047
,
0x00006a82
},
/* G x-advance: 106.507812 */
{
'@'
,
0x00000048
,
0x0000675b
},
/* H x-advance: 103.355469 */
{
'@'
,
0x00000049
,
0x00002889
},
/* I x-advance: 40.535156 */
{
'@'
,
0x0000004a
,
0x00002889
},
/* J x-advance: 40.535156 */
{
'@'
,
0x0000004b
,
0x00005a22
},
/* K x-advance: 90.132812 */
{
'@'
,
0x0000004c
,
0x00004c93
},
/* L x-advance: 76.574219 */
{
'@'
,
0x0000004d
,
0x00007697
},
/* M x-advance: 118.589844 */
{
'@'
,
0x0000004e
,
0x000066d1
},
/* N x-advance: 102.816406 */
{
'@'
,
0x0000004f
,
0x00006c30
},
/* O x-advance: 108.187500 */
{
'@'
,
0x00000050
,
0x000052e2
},
/* P x-advance: 82.882812 */
{
'@'
,
0x00000051
,
0x00006c30
},
/* Q x-advance: 108.187500 */
{
'@'
,
0x00000052
,
0x00005f80
},
/* R x-advance: 95.500000 */
{
'@'
,
0x00000053
,
0x0000573f
},
/* S x-advance: 87.246094 */
{
'@'
,
0x00000054
,
0x000053f5
},
/* T x-advance: 83.957031 */
{
'@'
,
0x00000055
,
0x0000649a
},
/* U x-advance: 100.601562 */
{
'@'
,
0x00000056
,
0x00005e06
},
/* V x-advance: 94.023438 */
{
'@'
,
0x00000057
,
0x000087e7
},
/* W x-advance: 135.902344 */
{
'@'
,
0x00000058
,
0x00005e29
},
/* X x-advance: 94.160156 */
{
'@'
,
0x00000059
,
0x000053f5
},
/* Y x-advance: 83.957031 */
{
'@'
,
0x0000005a
,
0x00005e29
},
/* Z x-advance: 94.160156 */
{
'@'
,
0x0000005b
,
0x0000359f
},
/* [ x-advance: 53.621094 */
{
'@'
,
0x0000005c
,
0x00002e4f
},
/* \ x-advance: 46.308594 */
{
'@'
,
0x0000005d
,
0x0000359f
},
/* ] x-advance: 53.621094 */
{
'@'
,
0x0000005e
,
0x0000732a
},
/* ^ x-advance: 115.164062 */
{
'@'
,
0x0000005f
,
0x000044b9
},
/* _ x-advance: 68.722656 */
{
'@'
,
0x00000060
,
0x000044b9
},
/* ` x-advance: 68.722656 */
{
'@'
,
0x00000061
,
0x0000543a
},
/* a x-advance: 84.226562 */
{
'@'
,
0x00000062
,
0x0000573f
},
/* b x-advance: 87.246094 */
{
'@'
,
0x00000063
,
0x00004b92
},
/* c x-advance: 75.570312 */
{
'@'
,
0x00000064
,
0x0000573f
},
/* d x-advance: 87.246094 */
{
'@'
,
0x00000065
,
0x00005490
},
/* e x-advance: 84.562500 */
{
'@'
,
0x00000066
,
0x00003063
},
/* f x-advance: 48.386719 */
{
'@'
,
0x00000067
,
0x0000573f
},
/* g x-advance: 87.246094 */
{
'@'
,
0x00000068
,
0x0000571d
},
/* h x-advance: 87.113281 */
{
'@'
,
0x00000069
,
0x00002630
},
/* i x-advance: 38.187500 */
{
'@'
,
0x0000006a
,
0x00002630
},
/* j x-advance: 38.187500 */
{
'@'
,
0x0000006b
,
0x00004f98
},
/* k x-advance: 79.593750 */
{
'@'
,
0x0000006c
,
0x00002630
},
/* l x-advance: 38.187500 */
{
'@'
,
0x0000006d
,
0x000085e4
},
/* m x-advance: 133.890625 */
{
'@'
,
0x0000006e
,
0x0000571d
},
/* n x-advance: 87.113281 */
{
'@'
,
0x0000006f
,
0x00005418
},
/* o x-advance: 84.093750 */
{
'@'
,
0x00000070
,
0x0000573f
},
/* p x-advance: 87.246094 */
{
'@'
,
0x00000071
,
0x0000573f
},
/* q x-advance: 87.246094 */
{
'@'
,
0x00000072
,
0x00003882
},
/* r x-advance: 56.507812 */
{
'@'
,
0x00000073
,
0x0000479c
},
/* s x-advance: 71.609375 */
{
'@'
,
0x00000074
,
0x000035e4
},
/* t x-advance: 53.890625 */
{
'@'
,
0x00000075
,
0x0000571d
},
/* u x-advance: 87.113281 */
{
'@'
,
0x00000076
,
0x00005157
},
/* v x-advance: 81.339844 */
{
'@'
,
0x00000077
,
0x0000706a
},
/* w x-advance: 112.414062 */
{
'@'
,
0x00000078
,
0x00005157
},
/* x x-advance: 81.339844 */
{
'@'
,
0x00000079
,
0x00005157
},
/* y x-advance: 81.339844 */
{
'@'
,
0x0000007a
,
0x00004825
},
/* z x-advance: 72.144531 */
{
'@'
,
0x0000007b
,
0x00005773
},
/* { x-advance: 87.449219 */
{
'@'
,
0x0000007c
,
0x00002e4f
},
/* | x-advance: 46.308594 */
{
'@'
,
0x0000007d
,
0x00005773
},
/* } x-advance: 87.449219 */
{
'@'
,
0x0000007e
,
0x0000732a
},
/* ~ x-advance: 115.164062 */
{
'@'
,
0x000000e9
,
0x00005490
},
/* é x-advance: 84.562500 */
{
'@'
,
0x000000f1
,
0x0000571d
},
/* ñ x-advance: 87.113281 */
{
'@'
,
0x000000d1
,
0x000066d1
},
/* Ñ x-advance: 102.816406 */
{
'@'
,
0x000000df
,
0x00005693
},
/* ß x-advance: 86.574219 */
{
'@'
,
0x000000e6
,
0x000086f7
},
/* æ x-advance: 134.964844 */
{
'@'
,
0x000000f8
,
0x00005418
},
/* ø x-advance: 84.093750 */
{
'@'
,
0x000000e5
,
0x0000543a
},
/* å x-advance: 84.226562 */
{
'@'
,
0x000000f6
,
0x00005418
},
/* ö x-advance: 84.093750 */
{
'@'
,
0x000000a3
,
0x00005773
},
/* £ x-advance: 87.449219 */
{
'@'
,
0x000000c6
,
0x000085e4
},
/* Æ x-advance: 133.890625 */
{
'@'
,
0x000000d6
,
0x00006c30
},
/* Ö x-advance: 108.187500 */
{
'@'
,
0x000000d8
,
0x00006c30
},
/* Ø x-advance: 108.187500 */
{
'@'
,
0x000000c5
,
0x00005e06
},
/* Å x-advance: 94.023438 */
{
'@'
,
0x000020ac
,
0x00005773
},
/* € x-advance: 87.449219 */
{
'@'
,
0x000000a7
,
0x000044b9
},
/* § x-advance: 68.722656 */
{
'@'
,
0x000003c0
,
0x000052c0
},
/* π x-advance: 82.750000 */
{
'@'
,
0x000000b0
,
0x000044b9
},
/* ° x-advance: 68.722656 */
{
'@'
,
0x000000fc
,
0x0000571d
},
/* ü x-advance: 87.113281 */
{
'@'
,
0x000000dc
,
0x0000649a
},
/* Ü x-advance: 100.601562 */
{
'@'
,
0x00002026
,
0x00008973
},
/* … x-advance: 137.449219 */
{
'@'
,
0x0000201d
,
0x00004735
},
/* ” x-advance: 71.207031 */
{
'@'
,
0x0000201c
,
0x00004735
},
/* “ x-advance: 71.207031 */
{
'@'
,
0x000000ab
,
0x00005418
},
/* « x-advance: 84.093750 */
{
'@'
,
0x000000bb
,
0x00005418
},
/* » x-advance: 84.093750 */
{
'@'
,
0x000000a9
,
0x00008973
},
/* © x-advance: 137.449219 */
{
'@'
,
0x000000ae
,
0x00008973
},
/* ® x-advance: 137.449219 */
{
'@'
,
0x00002122
,
0x00008973
},
/* ™ x-advance: 137.449219 */
{
'@'
,
0x000023ce
,
0x0000732a
},
/* ⏎ x-advance: 115.164062 */
{
'@'
,
0x0000232b
,
0x0000c25c
},
/* ⌫ x-advance: 194.359375 */
{
'@'
,
0x00002328
,
0x0000c663
},
/* ⌨ x-advance: 198.386719 */
{
'@'
,
0x000000b7
,
0x00002bb0
},
/* · x-advance: 43.687500 */
{
'@'
,
0x00002190
,
0x0000732a
},
/* ← x-advance: 115.164062 */
{
'@'
,
0x00002191
,
0x0000732a
},
/* ↑ x-advance: 115.164062 */
{
'@'
,
0x00002193
,
0x0000732a
},
/* ↓ x-advance: 115.164062 */
{
'@'
,
0x00002192
,
0x0000732a
},
/* → x-advance: 115.164062 */
{
'@'
,
0x00002623
,
0x00007b38
},
/* ☣ x-advance: 123.218750 */
{
'@'
,
0x00002600
,
0x00007b38
},
/* ☀ x-advance: 123.218750 */
{
'@'
,
0x00002601
,
0x00008973
},
/* ☁ x-advance: 137.449219 */
{
'@'
,
0x00002602
,
0x00007b38
},
/* ☂ x-advance: 123.218750 */
{
'@'
,
0x00002622
,
0x00007b38
},
/* ☢ x-advance: 123.218750 */
{
'@'
,
0x0000262d
,
0x00007b38
},
/* ☭ x-advance: 123.218750 */
{
'@'
,
0x0000262e
,
0x00007b38
},
/* ☮ x-advance: 123.218750 */
{
'@'
,
0x0000262f
,
0x00007b38
},
/* ☯ x-advance: 123.218750 */
{
'@'
,
0x0000263d
,
0x00007b38
},
/* ☽ x-advance: 123.218750 */
{
'@'
,
0x00002709
,
0x0000732a
},
/* ✉ x-advance: 115.164062 */
{
'@'
,
0x00002699
,
0x00007b38
},
/* ⚙ x-advance: 123.218750 */
{
'@'
,
0x000026a0
,
0x00007b38
},
/* ⚠ x-advance: 123.218750 */
{
'@'
,
0x00002423
,
0x0000573f
},
/* ␣ x-advance: 87.246094 */
{
'@'
,
0x000000b2
,
0x00003719
},
/* ² x-advance: 55.097656 */
{
'@'
,
0x000025c6
,
0x000069b4
},
/* ◆ x-advance: 105.703125 */
{
'@'
,
0x00002665
,
0x00007b38
},
/* ♥ x-advance: 123.218750 */
{
'@'
,
0x00002666
,
0x00007b38
},
/* ♦ x-advance: 123.218750 */
{
'@'
,
0x00002663
,
0x00007b38
},
/* ♣ x-advance: 123.218750 */
{
'@'
,
0x00002660
,
0x00007b38
},
/* ♠ x-advance: 123.218750 */
{
'@'
,
0x000025b2
,
0x000069b4
},
/* ▲ x-advance: 105.703125 */
{
'@'
,
0x000025bc
,
0x000069b4
},
/* ▼ x-advance: 105.703125 */
{
'@'
,
0x000000f7
,
0x0000732a
},
/* ÷ x-advance: 115.164062 */
{
'@'
,
0x00002248
,
0x0000732a
},
/* ≈ x-advance: 115.164062 */
{
'@'
,
0x000000b1
,
0x0000732a
},
/* ± x-advance: 115.164062 */
{
'@'
,
0x00002265
,
0x0000732a
},
/* ≥ x-advance: 115.164062 */
{
'@'
,
0x00002264
,
0x0000732a
},
/* ≤ x-advance: 115.164062 */
{
'@'
,
0x000000bd
,
0x00008538
},
/* ½ x-advance: 133.218750 */
{
'@'
,
0x000000bc
,
0x00008538
},
/* ¼ x-advance: 133.218750 */
{
'@'
,
0x00002574
,
0x000052c0
},
/* ╴ x-advance: 82.750000 */
{
'@'
,
0x00002212
,
0x0000732a
},
/* − x-advance: 115.164062 */
{
'@'
,
0x00002576
,
0x000052c0
},
/* ╶ x-advance: 82.750000 */
{
'@'
,
0x00002575
,
0x000052c0
},
/* ╵ x-advance: 82.750000 */
{
'@'
,
0x00002577
,
0x000052c0
},
/* ╷ x-advance: 82.750000 */
{
'@'
,
0x0000251b
,
0x000052c0
},
/* ┛ x-advance: 82.750000 */
{
'@'
,
0x00002513
,
0x000052c0
},
/* ┓ x-advance: 82.750000 */
{
'@'
,
0x00002523
,
0x000052c0
},
/* ┣ x-advance: 82.750000 */
{
'@'
,
0x0000254b
,
0x000052c0
},
/* ╋ x-advance: 82.750000 */
{
'@'
,
0x00002533
,
0x000052c0
},
/* ┳ x-advance: 82.750000 */
{
'@'
,
0x0000253b
,
0x000052c0
},
/* ┻ x-advance: 82.750000 */
{
'@'
,
0x0000252b
,
0x000052c0
},
/* ┫ x-advance: 82.750000 */
{
'@'
,
0x00002517
,
0x000052c0
},
/* ┗ x-advance: 82.750000 */
{
'@'
,
0x0000250f
,
0x000052c0
},
/* ┏ x-advance: 82.750000 */
{
'@'
,
0x00002503
,
0x000052c0
},
/* ┃ x-advance: 82.750000 */
{
'@'
,
0x00002501
,
0x000052c0
},
/* ━ x-advance: 82.750000 */
{
'@'
,
0x000023a2
,
0x000044b9
},
/* ⎢ x-advance: 68.722656 */
{
'@'
,
0x000023a5
,
0x000044b9
},
/* ⎥ x-advance: 68.722656 */
};
#define CTX_FONT_regular 1
#endif
lib/ctx/ctx-font-regular.h
0 → 100644
View file @
724c884b
#ifndef CTX_FONT_regular
/* this is a ctx encoded font based on DejaVuSans.ttf */
/* CTX_SUBDIV:4 CTX_BAKE_FONT_SIZE:160 */
/* glyphs covered:
!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
jklmnopqrstuvwxyz{|}~éñÑßæøåö£ÆÖØÅ€§π°üÜ…”“«»©®™⏎⌫·←↑↓→☀☁☂☢☭☮☯☽✉⚙⚠␣²◆♥♦♣♠÷
≈±╴−╶ */
static
const
struct
__attribute__
((
packed
))
{
uint8_t
code
;
uint32_t
a
;
uint32_t
b
;}
ctx_font_regular
[]
=
{
{
'@'
,
0x00000020
,
0x00002bb0
},
/* x-advance: 43.687500 */
{
'@'
,
0x00000021
,
0x00003719
},
/* ! x-advance: 55.097656 */
{
'm'
,
0x41a5e7f2
,
0xc1886037
},
{
'0'
,
0x44000036
,
0xbc0000ca
},
{
'm'
,
0x00000000
,
0xc2a64f08
},
{
'l'
,
0x4159fc90
,
0x00000000
},
{
'l'
,
0x00000000
,
0x422fd6c4
},
{
'l'
,
0xbfabcfe0
,
0x41bfad86
},
{
'l'
,
0xc12df5b2
,
0x00000000
},
{
'l'
,
0xbfb46710
,
0xc1bfad86
},
{
'l'
,
0x00000000
,
0xc22fd6c4
},
{
'@'
,
0x00000022
,
0x00003f38
},
/* " x-advance: 63.218750 */
{
'm'
,
0x41c50c07
,
0xc2c86716
},
{
'l'
,
0x00000000
,
0x4214fe48
},
{
'4'
,
0x0000ffd3
,
0xff6c0000
},
{
'6'
,
0x0000002d
,
0x00000065
},
{
'l'
,
0x00000000
,
0x4214fe48
},
{
'l'
,
0xc1368ce4
,
0x00000000
},
{
'l'
,
0x00000000
,
0xc214fe48
},
{
'l'
,
0x41368ce4
,
0x00000000
},
{
'@'
,
0x00000023
,
0x0000732a
},
/* # x-advance: 115.164062 */
{
'm'
,
0x428c8973
,
0xc271e113
},
{
'0'
,
0x59ea00b2
,
0xa716004e
},
{
'm'
,
0xc12112e8
,
0xc218c06d
},
{
'0'
,
0x004e6fe5
,
0x002a911c
},
{
'0'
,
0x00536fe5
,
0x00a22900
},
{
'0'
,
0x005559ea
,
0x00a12900
},
{
'0'
,
0x00d66fe5
,
0x00b2911b
},
{
'0'
,
0x00d56fe5
,
0x00ac911b
},
{
'0'
,
0x005ed700
,
0x00aaa716
},
{
'0'
,
0x0060d700
,
0x002b911b
},
{
'@'
,
0x00000024
,
0x00005773
},
/* $ x-advance: 87.449219 */
{
'm'
,
0x4239c595
,
0x41a19c59
},
{
'4'
,
0x0000ffe6
,
0xffb00000
},
{
'8'
,
0xfac800e4
,
0xeec8fae4
},
{
'l'
,
0x00000000
,
0xc14149e1
},
{
'8'
,
0x1a37111b
,
0x0839081c
},
{
'l'
,
0x00000000
,
0xc1f4d50c
},
{
'8'
,
0xe0aaf7c5
,
0xc1e6e9e6
},
{
'8'
,
0xbc1dd500
,
0xe454e71d
},
{
'4'
,
0xffc10000
,
0x0000001a
},
{
'l'
,
0x00000000
,
0x417920a8
},
{
'8'
,
0x05300118
,
0x0b2d0417
},
{
'l'
,
0x00000000
,
0x413beb60
},
{
'8'
,
0xefd3f5ea
,
0xf9d0fae9
},
{
'l'
,
0x00000000
,
0x41e54302
},
{
'8'
,
0x2159093c
,
0x421c181c
},
{
'8'
,
0x47e22d00
,
0x1ea91ae2
},
{
'6'
,
0x00510000
,
0xfee1ffe6
},
{
'l'
,
0x00000000
,
0xc1dc2258
},
{
'8'
,
0x11d103e1
,
0x25f00ef0
},
{
'8'
,
0x230f1700
,
0x12300c0f
},
{
'm'
,
0x40d6c3d8
,
0x414e2cac
},
{
'l'
,
0x00000000
,
0x41e87bb4
},
{
'8'
,
0xed33fc22
,
0xda11f211
},
{
'8'
,
0xdbf0e900
,
0xecccf3f0
},
{
'@'
,
0x00000025
,
0x0000829a
},
/* % x-advance: 130.601562 */
{
'm'
,
0x42c7dda3
,
0xc2306037
},
{
'8'
,
0x13dc00e9
,
0x37f313f3
},
{
'8'
,
0x370d2200
,
0x1324130d
},
{
'8'
,
0xed230016
,
0xc90dec0d
},
{
'8'
,
0xc9f3dd00
,
0xecddecf3
},
{
'm'
,
0x00000000
,
0xc1086034
},
{
'8'
,
0x1d43002a
,
0x4f181d18
},
{
'8'
,
0x4fe73200
,
0x1dbd1de8
},
{
'8'
,
0xe3bd00d6
,
0xb1e8e3e8
},
{
'8'
,
0xb118ce00
,
0xe343e319
},
{
'm'
,
0xc28a8603
,
0xc2237d6c
},
{
'8'
,
0x14dc00e9
,
0x36f313f3
},
{
'8'
,
0x370d2300
,
0x1324130d
},
{
'8'
,
0xed240017
,
0xc90ded0d
},
{
'8'
,
0xcaf3de00
,
0xecdcecf3
},
{
'm'
,
0x42726a86
,
0xc1086038
},
{
'l'
,
0x412bcfe0
,
0x00000000
},
{
'4'
,
0x019fff06
,
0x0000ffd6
},
{
'6'
,
0xfe6100fa
,
0x0000ff0e
},
{
'8'
,
0x1d43002a
,
0x4f191d19
},
{
'8'
,
0x50e73200
,
0x1dbd1de8
},
{
'8'
,
0xe3bd00d6
,
0xb0e8e3e8
},
{
'8'
,
0xb118cf00
,
0xe343e318
},
{
'@'
,
0x00000026
,
0x00006b2e
},
/* & x-advance: 107.179688 */
{
'm'
,
0x4205b0f7
,
0xc257920a
},
{
'8'
,
0x2bdd15e8
,
0x2df515f5
},
{
'8'
,
0x411c2700
,
0x1a471a1c
},
{
'8'
,
0xf82f0019
,
0xe729f816
},
{
'6'
,
0xff6fff72
,
0xffe20025
},
{
'l'
,
0x42086037
,
0x420b98e9
},
{
'8'
,
0xcd18e90f
,
0xc70ae508
},
{
'l'
,
0x4147bb40
,
0x00000000
},
{
'8'
,
0x46ef23fd
,
0x44da22f3
},
{
'4'
,
0x004c004a
,
0x0000ffbd
},
{
'l'
,
0xc1198e98
,
0xc11dda33
},
{
'8'
,
0x23c617e5
,
0x0bbf0be2
},
{
'8'
,
0xdc9700c0
,
0xa2d7dbd7
},
{
'8'
,
0xc011de00
,
0xc835e211
},
{
'8'
,
0xdfedf0f4
,
0xdffaf0fa
},
{
'8'
,
0xbb1dd500
,
0xe64fe61d
},
{
'8'
,
0x042c0016
,
0x0e2d0416
},
{
'l'
,
0x00000000
,
0x41436fb0
},
{
'8'
,
0xedd4f4e9
,
0xfad9faeb
},
{
'8'
,
0x0fd300e4
,
0x26ef0eef
},
{
'8'
,
0x1b070d00
,
0x26200d08
},
{
'@'
,
0x00000027
,
0x000025c9
},
/* ' x-advance: 37.785156 */
{
'm'
,
0x41c50c07
,
0xc2c86716
},
{
'l'
,
0x00000000
,
0x4214fe48
},
{
'l'
,
0xc1368ce3
,
0x00000000
},
{
'l'
,
0x00000000
,
0xc214fe48
},
{
'l'
,
0x41368ce3
,
0x00000000
},
{
'@'
,
0x00000028
,
0x0000359f
},
/* ( x-advance: 53.621094 */
{
'm'
,
0x422a7844
,
0xc2d09732
},
{
'q'
,
0xc10fe480
,
0x4176fae0
},
{
0
,
0xc155b0f6
,
0x41f44b9c
},
{
'q'
,
0xc08b98e8
,
0x41719c54
},
{
0
,
0xc08b98e8
,
0x41f4d50a
},
{
'q'
,
0x00000000
,
0x41780dbe
},
{
0
,
0x408b98e8
,
0x41f5e7f2
},
{
'9'
,
0x003c0011
,
0x007a0035
},
{
'l'
,
0xc12bcfe2
,
0x00000000
},
{
'q'
,
0xc12112e6
,
0xc17c5958
},
{
0
,
0xc1719c5a
,
0xc1f80dbf
},
{
'q'
,
0xc09eed18
,
0xc173c224
},
{
0
,
0xc09eed18
,
0xc1f225cc
},
{
'q'
,
0x00000000
,
0xc16f768c
},
{
0
,
0x409eed18
,
0xc1f112e6
},
{
'q'
,
0x409eed1c
,
0xc172af40
},
{
0
,
0x41719c5a
,
0xc1f80dc0
},
{
'l'
,
0x412bcfe2
,
0x00000000
},
{
'@'
,
0x00000029
,
0x0000359f
},
/* ) x-advance: 53.621094 */
{
'm'
,
0x41301b7d
,
0xc2d09732
},
{
'l'
,
0x412bcfe5
,
0x00000000
},
{
'q'
,
0x412112e6
,
0x417d6c40
},
{
0
,
0x41708972
,
0x41f80dc0
},
{
'q'
,
0x40a112e8
,
0x4172af40
},
{
0
,
0x40a112e8
,
0x41f112e6
},
{
'q'
,
0x00000000
,
0x41708974
},
{
0
,
0xc0a112e8
,
0x41f225cc
},
{
'9'
,
0x003cffed
,
0x007cffc4
},
{
'l'
,
0xc12bcfe5
,
0x00000000
},
{
'q'
,
0x410ed19d
,
0xc175e7f3
},
{
0
,
0x41549e11
,
0xc1f44b99
},
{
'q'
,
0x408dbeb4
,
0xc173c226
},
{
0
,
0x408dbeb4
,
0xc1f5e7f2
},
{
'q'
,
0x00000000
,
0xc1780dc0
},
{
0
,
0xc08dbeb4
,
0xc1f4d50a
},
{
'q'
,
0xc08b98e8
,
0xc1719c58
},
{
0
,
0xc1549e11
,
0xc1f44b9c
},
{
'@'
,
0x0000002a
,
0x000044b9
},
/* * x-advance: 68.722656 */
{
'm'
,
0x42814302
,
0xc2a761ef
},
{
'0'
,
0x346034a0
,
0xcaa61af1
},
{
'0'
,
0x00e26500
,
0x36a69b00
},
{
'0'
,
0xcc60e6f1
,
0xe60fcca0
},
{
'0'
,
0x9b00365a
,
0x6500001e
},
{
'l'
,
0x41b46716
,
0xc159fc90
},
{
'l'
,
0x407920b0
,
0x40d49e10
},
{
'@'
,
0x0000002b
,
0x0000732a
},
/* + x-advance: 115.164062 */
{
'm'
,
0x427ce2ca
,
0xc2ac5957
},
{
'l'
,
0x00000000
,
0x421587ba
},
{
'l'
,
0x421587bc
,
0x00000000
},
{
'l'
,
0x00000000
,
0x41368ce4
},
{
'l'
,
0xc21587bc
,
0x00000000
},
{
'l'
,
0x00000000
,
0x421587bb
},
{
'l'
,
0xc1346714
,
0x00000000
},
{
'l'
,
0x00000000
,
0xc21587bb
},
{
'l'
,
0xc21587bb
,
0x00000000
},
{
'l'
,
0xb5800000
,
0xc1368ce4
},
{
'l'
,
0x421587bb
,
0x00000000
},
{
'l'
,
0x00000000
,
0xc21587ba
},
{
'l'
,
0x41346714
,
0x00000000
},
{
'@'
,
0x0000002c
,
0x00002bb0
},
/* , x-advance: 43.687500 */
{
'm'
,
0x4180dbeb
,
0xc1886037
},
{
'0'
,
0x2e000038
,
0x00de55d4
},
{
'l'
,
0x40b01b7c
,
0xc1abcfe4
},
{
'l'
,
0x00000000
,
0xc138b2b0
},
{
'@'
,
0x0000002d
,
0x00003198
},
/* - x-advance: 49.593750 */
{
'm'
,
0x40d6c3dd
,
0xc22c9e11
},
{
'l'
,
0x4210b2af
,
0x00000000
},
{
'l'
,
0x00000000
,
0x41301b7c
},
{
'l'
,
0xc210b2af
,
0x00000000
},
{
'l'
,
0xb5c00000
,
0xc1301b7c
},
{
'@'
,
0x0000