Skip to content

Commit e9cd24f

Browse files
committed
1.0.8
1 parent 0b45225 commit e9cd24f

File tree

6 files changed

+38
-38
lines changed

6 files changed

+38
-38
lines changed

RELEASES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## 1.0.8
44

55
* fontconv now notifies users of requested characters unavailable in the font.
6-
* Renamed --points parameter to --pixels.
6+
* Renamed fontconv --points parameter to --pixels.
77
* Improved documentation.
88

99
## 1.0.7

examples/arduino/helloworld-stm32-st7789/helloworld-stm32-st7789.ino

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
#include "display.h"
1414
#include "system.h"
1515

16-
#include "mcu-renderer-fonts/font_material_symbolsR12_4.h"
16+
#include "mcu-renderer-fonts/font_material_symbolsR12_4bpp.h"
1717

18-
#include "mcu-renderer-fonts/font_robotoM12_4.h"
18+
#include "mcu-renderer-fonts/font_robotoM12_4bpp.h"
1919

20-
#include "mcu-renderer-fonts/font_robotoM48_1.h"
21-
#include "mcu-renderer-fonts/font_robotoM48_2.h"
22-
#include "mcu-renderer-fonts/font_robotoM48_3.h"
23-
#include "mcu-renderer-fonts/font_robotoM48_4.h"
20+
#include "mcu-renderer-fonts/font_robotoM48_1bpp.h"
21+
#include "mcu-renderer-fonts/font_robotoM48_2bpp.h"
22+
#include "mcu-renderer-fonts/font_robotoM48_3bpp.h"
23+
#include "mcu-renderer-fonts/font_robotoM48_4bpp.h"
2424

2525
#define STATUSBAR_X 0
2626
#define STATUSBAR_Y 0
@@ -54,10 +54,10 @@ void setup()
5454
"4bit",
5555
};
5656
const uint8_t *test_fonts[] = {
57-
font_robotoM48_1,
58-
font_robotoM48_2,
59-
font_robotoM48_3,
60-
font_robotoM48_4,
57+
font_robotoM48_1bpp,
58+
font_robotoM48_2bpp,
59+
font_robotoM48_3bpp,
60+
font_robotoM48_4bpp,
6161
};
6262
for (uint32_t y = 0; y < 2; y++)
6363
{
@@ -111,17 +111,17 @@ void setup()
111111
rectangle.width = statusbar_x[i + 1] - statusbar_x[i];
112112

113113
if (i < 2)
114-
mr_set_font(&mr, font_robotoM12_4);
114+
mr_set_font(&mr, font_robotoM12_4bpp);
115115
else
116-
mr_set_font(&mr, font_material_symbolsR12_4);
116+
mr_set_font(&mr, font_material_symbolsR12_4bpp);
117117

118118
if (i < 1)
119119
mr_set_stroke_color(&mr, mr_get_color(0x000000));
120120
else
121121
mr_set_stroke_color(&mr, mr_get_color(0x707070));
122122

123123
offset = (mr_point_t){
124-
FONT_ROBOTOM12_4_CAP_HEIGHT,
124+
FONT_ROBOTOM12_4BPP_CAP_HEIGHT,
125125
(STATUSBAR_HEIGHT - mr_get_line_height(&mr)) / 2};
126126

127127
mr_draw_utf8_text(&mr,

examples/gammacalibration-stm32-st7789/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "keyboard.h"
1515
#include "system.h"
1616

17-
#include "mcu-renderer-fonts/font_robotoM24_4.h"
17+
#include "mcu-renderer-fonts/font_robotoM24_4bpp.h"
1818

1919
#define GRADIENT_HEIGHT ((DISPLAY_HEIGHT - 40) / 4)
2020

@@ -167,7 +167,7 @@ int main(void)
167167
strcat(text, "=");
168168
strcat_uint8(text, value);
169169

170-
mr_set_font(&mr, font_robotoM24_4);
170+
mr_set_font(&mr, font_robotoM24_4bpp);
171171
mr_set_fill_color(&mr, mr_get_color(0x000000));
172172
mr_set_stroke_color(&mr, mr_get_color(0xffffff));
173173

examples/helloworld-sdl/src/display.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "mcu-renderer-sdl.h"
1414

1515
#define DISPLAY_WIDTH 320
16-
#define DISPLAY_HEIGHT 170
16+
#define DISPLAY_HEIGHT 240
1717

1818
// Enable for monochrome output:
1919
// #define DISPLAY_MONOCHROME

examples/helloworld-sdl/src/main.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
#include "display.h"
1414
#include "system.h"
1515

16-
#include "mcu-renderer-fonts/font_material_symbolsR12_4.h"
16+
#include "mcu-renderer-fonts/font_material_symbolsR12_4bpp.h"
1717

18-
#include "mcu-renderer-fonts/font_robotoM12_4.h"
18+
#include "mcu-renderer-fonts/font_robotoM12_4bpp.h"
1919

20-
#include "mcu-renderer-fonts/font_robotoM48_1.h"
21-
#include "mcu-renderer-fonts/font_robotoM48_2.h"
22-
#include "mcu-renderer-fonts/font_robotoM48_3.h"
23-
#include "mcu-renderer-fonts/font_robotoM48_4.h"
20+
#include "mcu-renderer-fonts/font_robotoM48_1bpp.h"
21+
#include "mcu-renderer-fonts/font_robotoM48_2bpp.h"
22+
#include "mcu-renderer-fonts/font_robotoM48_3bpp.h"
23+
#include "mcu-renderer-fonts/font_robotoM48_4bpp.h"
2424

2525
#define STATUSBAR_X 0
2626
#define STATUSBAR_Y 0
@@ -54,10 +54,10 @@ int main(void)
5454
"4bit",
5555
};
5656
const uint8_t *test_fonts[] = {
57-
font_robotoM48_1,
58-
font_robotoM48_2,
59-
font_robotoM48_3,
60-
font_robotoM48_4,
57+
font_robotoM48_1bpp,
58+
font_robotoM48_2bpp,
59+
font_robotoM48_3bpp,
60+
font_robotoM48_4bpp,
6161
};
6262
for (uint32_t y = 0; y < 2; y++)
6363
{
@@ -113,17 +113,17 @@ int main(void)
113113
rectangle.width = statusbar_x[i + 1] - statusbar_x[i];
114114

115115
if (i < 2)
116-
mr_set_font(&mr, font_robotoM12_4);
116+
mr_set_font(&mr, font_robotoM12_4bpp);
117117
else
118-
mr_set_font(&mr, font_material_symbolsR12_4);
118+
mr_set_font(&mr, font_material_symbolsR12_4bpp);
119119

120120
if (i < 1)
121121
mr_set_stroke_color(&mr, mr_get_color(0x000000));
122122
else
123123
mr_set_stroke_color(&mr, mr_get_color(0x707070));
124124

125125
offset = (mr_point_t){
126-
FONT_ROBOTOM12_4_CAP_HEIGHT,
126+
FONT_ROBOTOM12_4BPP_CAP_HEIGHT,
127127
(STATUSBAR_HEIGHT - mr_get_line_height(&mr)) / 2};
128128

129129
mr_draw_utf8_text(&mr,

src/mcu-renderer.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ void mr_draw_string_textbuffer(mr_t *mr,
123123
mr_get_charcode_callback_t get_charcode_callback);
124124

125125
void mr_draw_bitmap_framebuffer_monochrome_vertical(mr_t *mr,
126-
const mr_rectangle_t *rectangle,
127-
const uint8_t *bitmap);
126+
const mr_rectangle_t *rectangle,
127+
const uint8_t *bitmap);
128128
void mr_draw_bitmap_framebuffer_color(mr_t *mr,
129129
const mr_rectangle_t *rectangle,
130130
const uint8_t *bitmap);
@@ -317,7 +317,7 @@ void mr_set_font(mr_t *mr,
317317
* @param mr The mcu-renderer instance.
318318
* @param str The string.
319319
* @param rectangle The rectangle containing the text.
320-
* @param offset The upper left corner of the text relative to the text rectangle.
320+
* @param offset The upper (ascent) left corner of the text relative to the text rectangle.
321321
*/
322322
void mr_draw_text(mr_t *mr,
323323
const char *str,
@@ -330,7 +330,7 @@ void mr_draw_text(mr_t *mr,
330330
* @param mr The mcu-renderer instance.
331331
* @param str The string.
332332
* @param rectangle The rectangle containing the text.
333-
* @param offset The upper left corner of the text relative to the text rectangle.
333+
* @param offset The upper (ascent) left corner of the text relative to the text rectangle.
334334
*/
335335
void mr_draw_utf8_text(mr_t *mr,
336336
const uint8_t *str,
@@ -343,7 +343,7 @@ void mr_draw_utf8_text(mr_t *mr,
343343
* @param mr The mcu-renderer instance.
344344
* @param str The string.
345345
* @param rectangle The rectangle containing the text.
346-
* @param offset The upper left corner of the text relative to the text rectangle.
346+
* @param offset The upper (ascent) left corner of the text relative to the text rectangle.
347347
*/
348348
void mr_draw_utf16_text(mr_t *mr,
349349
const uint16_t *str,
@@ -353,7 +353,7 @@ void mr_draw_utf16_text(mr_t *mr,
353353
/**
354354
* Returns the pixel width of a C-string.
355355
*
356-
* The pixel width is calculated from initial to final pen position.
356+
* The pixel width is calculated adding the respective glyph widths.
357357
*
358358
* @param mr The mcu-renderer instance.
359359
* @param str The string.
@@ -366,7 +366,7 @@ int16_t mr_get_text_width(mr_t *mr,
366366
/**
367367
* Returns the pixel width of a UTF-8 string.
368368
*
369-
* The pixel width is calculated from initial to final pen position.
369+
* The pixel width is calculated adding the respective glyph widths.
370370
*
371371
* @param mr The mcu-renderer instance.
372372
* @param str The string.
@@ -379,7 +379,7 @@ int16_t mr_get_utf8_text_width(mr_t *mr,
379379
/**
380380
* Returns the pixel width of a UTF-16 string.
381381
*
382-
* The pixel width is calculated from initial to final pen position.
382+
* The pixel width is calculated adding the respective glyph widths.
383383
*
384384
* @param mr The mcu-renderer instance.
385385
* @param str The string.

0 commit comments

Comments
 (0)