summaryrefslogtreecommitdiff
path: root/src/displayapp/fonts/neofont.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/displayapp/fonts/neofont.c')
-rw-r--r--src/displayapp/fonts/neofont.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/displayapp/fonts/neofont.c b/src/displayapp/fonts/neofont.c
index 12a467a..c868c99 100644
--- a/src/displayapp/fonts/neofont.c
+++ b/src/displayapp/fonts/neofont.c
@@ -25,7 +25,7 @@
#define X 1
#define _ 0
-static uint8_t glyphs[][2] = {
+static const uint8_t glyphs[][2] = {
G( _, X, _,
X, _, X,
X, _, X,
@@ -38,8 +38,8 @@ static uint8_t glyphs[][2] = {
_, X, _,
X, X, X ),
- G( _, X, _,
- X, _, X,
+ G( X, X, _,
+ _, _, X,
_, _, X,
_, X, _,
X, X, X ),
@@ -404,8 +404,8 @@ static bool neofont1_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t *
dsc_out->adv_w = 8; /*Horizontal space required by the glyph in [px]*/
dsc_out->box_h = 10; /*Height of the bitmap in [px]*/
dsc_out->box_w = 6; /*Width of the bitmap in [px]*/
- dsc_out->ofs_x = 0; /*X offset of the bitmap in [pf]*/
- dsc_out->ofs_y = 0; /*Y offset of the bitmap measured from the as line*/
+ dsc_out->ofs_x = 1; /*X offset of the bitmap in [pf]*/
+ dsc_out->ofs_y = -1; /*Y offset of the bitmap measured from the as line*/
dsc_out->bpp = 1; /*Bits per pixel: 1/2/4/8*/
return true; /*true: glyph found; false: glyph was not found*/
@@ -563,8 +563,8 @@ static bool neofont2_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t *
dsc_out->adv_w = 16; /*Horizontal space required by the glyph in [px]*/
dsc_out->box_h = 20; /*Height of the bitmap in [px]*/
dsc_out->box_w = 12; /*Width of the bitmap in [px]*/
- dsc_out->ofs_x = 0; /*X offset of the bitmap in [pf]*/
- dsc_out->ofs_y = 0; /*Y offset of the bitmap measured from the as line*/
+ dsc_out->ofs_x = 2; /*X offset of the bitmap in [pf]*/
+ dsc_out->ofs_y = -2; /*Y offset of the bitmap measured from the as line*/
dsc_out->bpp = 1; /*Bits per pixel: 1/2/4/8*/
return true; /*true: glyph found; false: glyph was not found*/
}
@@ -662,16 +662,16 @@ static bool neofont3_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t *
dsc_out->adv_w = 32; /*Horizontal space required by the glyph in [px]*/
dsc_out->box_h = 40; /*Height of the bitmap in [px]*/
dsc_out->box_w = 24; /*Width of the bitmap in [px]*/
- dsc_out->ofs_x = 0; /*X offset of the bitmap in [pf]*/
- dsc_out->ofs_y = 0; /*Y offset of the bitmap measured from the as line*/
+ dsc_out->ofs_x = 4; /*X offset of the bitmap in [pf]*/
+ dsc_out->ofs_y = -4; /*Y offset of the bitmap measured from the as line*/
dsc_out->bpp = 1; /*Bits per pixel: 1/2/4/8*/
return true; /*true: glyph found; false: glyph was not found*/
}
static void mono_bitmap_scale_4(
const uint8_t *u, uint8_t *v, unsigned int w, unsigned int h,
- uint8_t *u0, uint8_t *u1,
- uint8_t *v0, uint8_t *v1
+ const uint8_t *u0, const uint8_t *u1,
+ const uint8_t *v0, const uint8_t *v1
) {
unsigned int y = 0;
uint8_t U;