/lvgl-latest/src/others/imgfont/ |
D | lv_imgfont.c | 21 lv_font_t font; member 30 static bool imgfont_get_glyph_dsc(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, 57 lv_font_t * font = &dsc->font; in lv_imgfont_create() local 58 font->dsc = dsc; in lv_imgfont_create() 59 font->get_glyph_dsc = imgfont_get_glyph_dsc; in lv_imgfont_create() 60 font->get_glyph_bitmap = imgfont_get_glyph_bitmap; in lv_imgfont_create() 61 font->subpx = LV_FONT_SUBPX_NONE; in lv_imgfont_create() 62 font->line_height = height; in lv_imgfont_create() 63 font->base_line = 0; in lv_imgfont_create() 64 font->underline_position = 0; in lv_imgfont_create() [all …]
|
/lvgl-latest/docs/details/other-components/ |
D | font_manager.rst | 9 provided font-management functions includes: 11 - Font resource reference counting (reduces repeated creation of font resources). 12 - Font resource concatenation (font fallback). 13 - Font resource recycling mechanism (buffers recently deleted font resources to 26 length of the font name. 31 Use :cpp:func:`lv_font_manager_create` to create a font manager, where the 32 :cpp:func:`recycle_cache_size` parameter is used to set the number of font recycling 33 caches, which can improve font creation efficiency. 35 Use :cpp:func:`lv_font_manager_add_path_static` to add a mapping between the font 36 file path and the custom font name, so that the application can access the font [all …]
|
/lvgl-latest/src/font/ |
D | lv_font.c | 54 const lv_font_t * font = g_dsc->resolved_font; in lv_font_glyph_release_draw_data() local 56 if(font != NULL && font->release_glyph) { in lv_font_glyph_release_draw_data() 57 font->release_glyph(font, g_dsc); in lv_font_glyph_release_draw_data() 120 uint16_t lv_font_get_glyph_width(const lv_font_t * font, uint32_t letter, uint32_t letter_next) in lv_font_get_glyph_width() argument 122 LV_ASSERT_NULL(font); in lv_font_get_glyph_width() 128 lv_font_get_glyph_dsc(font, &g, letter, letter_next); in lv_font_get_glyph_width() 132 void lv_font_set_kerning(lv_font_t * font, lv_font_kerning_t kerning) in lv_font_set_kerning() argument 134 LV_ASSERT_NULL(font); in lv_font_set_kerning() 135 font->kerning = kerning; in lv_font_set_kerning() 138 int32_t lv_font_get_line_height(const lv_font_t * font) in lv_font_get_line_height() argument [all …]
|
D | lv_binfont_loader.c | 66 static bool lvgl_load_font(lv_fs_file_t * fp, lv_font_t * font); 88 lv_font_t * font = lv_malloc_zeroed(sizeof(lv_font_t)); in lv_binfont_create() local 89 LV_ASSERT_MALLOC(font); in lv_binfont_create() 91 if(!lvgl_load_font(&file, font)) { in lv_binfont_create() 98 lv_binfont_destroy(font); in lv_binfont_create() 99 font = NULL; in lv_binfont_create() 104 return font; in lv_binfont_create() 117 void lv_binfont_destroy(lv_font_t * font) in lv_binfont_destroy() argument 119 if(font == NULL) return; in lv_binfont_destroy() 121 const lv_font_fmt_txt_dsc_t * dsc = font->dsc; in lv_binfont_destroy() [all …]
|
/lvgl-latest/src/others/font_manager/ |
D | lv_font_manager.c | 23 #define IS_FONT_HAS_FALLBACK(font) ((font)->fallback != NULL) argument 47 lv_font_t font; /* lvgl font info */ member 64 …v_font_rec_node_t * lv_font_manager_search_rec_node(lv_font_manager_t * manager, lv_font_t * font); 71 static bool lv_font_manager_delete_font_single(lv_font_manager_t * manager, lv_font_t * font); 74 static void lv_font_manager_delete_font_family(lv_font_manager_t * manager, lv_font_t * font); 215 void lv_font_manager_delete_font(lv_font_manager_t * manager, lv_font_t * font) in lv_font_manager_delete_font() argument 218 LV_ASSERT_NULL(font); in lv_font_manager_delete_font() 220 if(IS_FONT_HAS_FALLBACK(font)) { in lv_font_manager_delete_font() 221 lv_font_manager_delete_font_family(manager, font); in lv_font_manager_delete_font() 225 lv_font_manager_delete_font_single(manager, font); in lv_font_manager_delete_font() [all …]
|
D | lv_font_manager_recycle.c | 32 lv_font_t * font; member 103 lv_font_t * font = recycle->font; in lv_font_manager_recycle_get_reuse() local 104 LV_LOG_INFO("found font: %p", (void *)font); in lv_font_manager_recycle_get_reuse() 109 return font; in lv_font_manager_recycle_get_reuse() 118 void lv_font_manager_recycle_set_reuse(lv_font_manager_recycle_t * manager, lv_font_t * font, in lv_font_manager_recycle_set_reuse() argument 140 recycle->font = font; in lv_font_manager_recycle_set_reuse() 157 lv_freetype_font_delete(recycle->font); in lv_font_recycle_close()
|
/lvgl-latest/src/draw/ |
D | lv_draw_label.c | 68 dsc->font = LV_FONT_DEFAULT; in lv_draw_letter_dsc_init() 81 dsc->font = LV_FONT_DEFAULT; in lv_draw_label_dsc_init() 105 if(dsc->font == NULL) { in lv_draw_label() 132 if(dsc->font == NULL) { in lv_draw_character() 142 lv_font_get_glyph_dsc(dsc->font, &g, unicode_letter, 0); in lv_draw_character() 148 a.y2 = a.y1 + lv_font_get_line_height(g.resolved_font ? g.resolved_font : dsc->font); in lv_draw_character() 171 if(dsc->font == NULL) { in lv_draw_letter() 176 const lv_font_t * font = dsc->font; in lv_draw_letter() local 180 lv_font_get_glyph_dsc(font, &g, dsc->unicode, 0); in lv_draw_letter() 182 font = g.resolved_font ? g.resolved_font : dsc->font; in lv_draw_letter() [all …]
|
/lvgl-latest/docs/details/main-components/ |
D | font.rst | 16 to render images of individual letters (glyph). A font is stored in a 22 lv_style_set_text_font(&my_style, &lv_font_montserrat_28); /* Set a larger font */ 34 - the font is stored as an array of bitmaps, one bitmap per glyph; 38 For advanced formats, the font information is stored in its respective format. 41 font. For example, ``format = LV_FONT_GLYPH_FORMAT_A4`` makes a font nearly four 68 (assuming the font supports them), LVGL cannot correctly render 102 - :c:macro:`LV_FONT_MONTSERRAT_12`: 12 px font 103 - :c:macro:`LV_FONT_MONTSERRAT_14`: 14 px font 104 - :c:macro:`LV_FONT_MONTSERRAT_16`: 16 px font 105 - :c:macro:`LV_FONT_MONTSERRAT_18`: 18 px font [all …]
|
/lvgl-latest/docs/details/libs/ |
D | tiny_ttf.rst | 4 Tiny TTF font engine 18 create a TTF font instance at the specified line height. You can then 19 use that font anywhere :c:struct:`lv_font_t` is accepted. 27 entire time the font is being used. 29 After a font is created, you can change the font size in pixels by using 30 :cpp:expr:`lv_tiny_ttf_set_size(font, font_size)`. 32 By default, a font will cache data for upto 256 glyphs elements to speed up rendering.
|
/lvgl-latest/examples/libs/freetype/ |
D | lv_example_freetype_2.c | 17 …lv_font_t * font = lv_freetype_font_create(PATH_PREFIX "lvgl/examples/libs/freetype/Lato-Regular.t… in lv_example_freetype_2() local 30 if(!font || !font_emoji) { in lv_example_freetype_2() 35 font->fallback = font_emoji; in lv_example_freetype_2() 40 lv_style_set_text_font(&style, font); in lv_example_freetype_2()
|
D | lv_example_freetype_1.c | 17 …lv_font_t * font = lv_freetype_font_create(PATH_PREFIX "lvgl/examples/libs/freetype/Lato-Regular.t… in lv_example_freetype_1() local 22 if(!font) { in lv_example_freetype_1() 30 lv_style_set_text_font(&style, font); in lv_example_freetype_1()
|
/lvgl-latest/src/libs/tiny_ttf/ |
D | lv_tiny_ttf.c | 88 static bool ttf_get_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t * dsc_out, uint32_t un… 91 static void ttf_release_glyph_cb(const lv_font_t * font, lv_font_glyph_dsc_t * g_dsc); 123 void lv_tiny_ttf_set_size(lv_font_t * font, int32_t font_size) in lv_tiny_ttf_set_size() argument 129 ttf_font_desc_t * dsc = (ttf_font_desc_t *)font->dsc; in lv_tiny_ttf_set_size() 133 font->line_height = (int32_t)(dsc->scale * (dsc->ascent - dsc->descent + line_gap)); in lv_tiny_ttf_set_size() 134 font->base_line = (int32_t)(dsc->scale * (line_gap - dsc->descent)); in lv_tiny_ttf_set_size() 151 void lv_tiny_ttf_destroy(lv_font_t * font) in lv_tiny_ttf_destroy() argument 153 LV_ASSERT_NULL(font); in lv_tiny_ttf_destroy() 155 if(font->dsc != NULL) { in lv_tiny_ttf_destroy() 156 ttf_font_desc_t * ttf = (ttf_font_desc_t *)font->dsc; in lv_tiny_ttf_destroy() [all …]
|
/lvgl-latest/tests/src/test_cases/libs/ |
D | test_font_stress.c | 40 typedef void (*font_delete_cb_t)(struct _font_stress_ctx_t * ctx, lv_font_t * font); 97 …lv_font_t * font = ctx->font_create_cb(ctx, font_name, LV_FREETYPE_FONT_RENDER_MODE_BITMAP, size, … in font_stress_label_create() local 98 if(!font) { in font_stress_label_create() 103 lv_obj_set_style_text_font(label, font, 0); in font_stress_label_create() 119 const lv_font_t * font = lv_obj_get_style_text_font(label, 0); in font_stress_label_delete() local 120 TEST_ASSERT_NOT_NULL(font); in font_stress_label_delete() 122 ctx->font_delete_cb(ctx, (lv_font_t *)font); in font_stress_label_delete() 173 static void freetype_font_delete_cb(font_stress_ctx_t * ctx, lv_font_t * font) in freetype_font_delete_cb() argument 176 lv_freetype_font_delete(font); in freetype_font_delete_cb() 189 static void font_manager_font_delete_cb(font_stress_ctx_t * ctx, lv_font_t * font) in font_manager_font_delete_cb() argument [all …]
|
/lvgl-latest/src/libs/freetype/ |
D | lv_freetype_outline.c | 39 static void freetype_release_glyph_cb(const lv_font_t * font, lv_font_glyph_dsc_t * g_dsc); 80 dsc->font.get_glyph_bitmap = freetype_get_glyph_bitmap_cb; in lv_freetype_set_cbs_outline_font() 81 dsc->font.release_glyph = freetype_release_glyph_cb; in lv_freetype_set_cbs_outline_font() 93 uint32_t lv_freetype_outline_get_scale(const lv_font_t * font) in lv_freetype_outline_get_scale() argument 95 LV_ASSERT_NULL(font); in lv_freetype_outline_get_scale() 96 const lv_freetype_font_dsc_t * dsc = font->dsc; in lv_freetype_outline_get_scale() 102 bool lv_freetype_is_outline_font(const lv_font_t * font) in lv_freetype_is_outline_font() argument 104 LV_ASSERT_NULL(font); in lv_freetype_is_outline_font() 105 const lv_freetype_font_dsc_t * dsc = font->dsc; in lv_freetype_is_outline_font() 168 const lv_font_t * font = g_dsc->resolved_font; in freetype_get_glyph_bitmap_cb() local [all …]
|
D | lv_freetype_image.c | 46 static void freetype_image_release_cb(const lv_font_t * font, lv_font_glyph_dsc_t * g_dsc); 77 dsc->font.get_glyph_bitmap = freetype_get_glyph_bitmap_cb; in lv_freetype_set_cbs_image_font() 78 dsc->font.release_glyph = freetype_image_release_cb; in lv_freetype_set_cbs_image_font() 89 const lv_font_t * font = g_dsc->resolved_font; in freetype_get_glyph_bitmap_cb() local 90 lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)font->dsc; in freetype_get_glyph_bitmap_cb() 111 static void freetype_image_release_cb(const lv_font_t * font, lv_font_glyph_dsc_t * g_dsc) in freetype_image_release_cb() argument 113 LV_ASSERT_NULL(font); in freetype_image_release_cb() 114 lv_freetype_font_dsc_t * dsc = (lv_freetype_font_dsc_t *)font->dsc; in freetype_image_release_cb()
|
D | lv_freetype.c | 176 lv_font_t * font = &dsc->font; in lv_freetype_font_create() local 177 font->dsc = dsc; in lv_freetype_font_create() 178 font->subpx = LV_FONT_SUBPX_NONE; in lv_freetype_font_create() 179 font->line_height = FT_F26DOT6_TO_INT(face->size->metrics.height); in lv_freetype_font_create() 180 font->base_line = -FT_F26DOT6_TO_INT(face->size->metrics.descender); in lv_freetype_font_create() 184 font->underline_position = FT_F26DOT6_TO_INT(FT_MulFix(scale, face->underline_position)); in lv_freetype_font_create() 185 font->underline_thickness = thickness < 1 ? 1 : thickness; in lv_freetype_font_create() 187 return font; in lv_freetype_font_create() 190 void lv_freetype_font_delete(lv_font_t * font) in lv_freetype_font_delete() argument 192 LV_ASSERT_NULL(font); in lv_freetype_font_delete() [all …]
|
D | lv_freetype.h | 91 void lv_freetype_font_delete(lv_font_t * font); 108 uint32_t lv_freetype_outline_get_scale(const lv_font_t * font); 116 bool lv_freetype_is_outline_font(const lv_font_t * font);
|
/lvgl-latest/tests/src/test_files/fonts/noto/ |
D | README.txt | 4 This download contains Noto Sans SC as both a variable font and static fonts. 6 Noto Sans SC is a variable font with this axis: 14 in those cases you can use the static font files for Noto Sans SC: 28 1. Install the font files you want to use 30 2. Use your app's font picker to view the font family and all the 54 Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux 55 …Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
|
/lvgl-latest/examples/libs/tiny_ttf/ |
D | index.rst | 1 Open a font with Tiny TTF from data array 8 Load a font with Tiny_TTF from file 14 Change font size with Tiny_TTF
|
D | lv_example_tiny_ttf_3.c | 21 lv_font_t * font = lv_tiny_ttf_create_data(ubuntu_font, ubuntu_font_size, 25); in lv_example_tiny_ttf_3() local 22 lv_style_set_text_font(&style, font); in lv_example_tiny_ttf_3() 50 lv_font_t * font = (lv_font_t *) v.ptr; in font_size_observer_cb() local 53 lv_tiny_ttf_set_size(font, size); in font_size_observer_cb()
|
/lvgl-latest/examples/others/font_manager/ |
D | lv_example_font_manager_1.c | 23 lv_font_t * font = lv_font_manager_create_font(g_font_manager, in lv_example_font_manager_1() local 29 if(!font) { in lv_example_font_manager_1() 36 lv_obj_set_style_text_font(label, font, 0); in lv_example_font_manager_1()
|
/lvgl-latest/docs/_static/css/ |
D | custom.css | 29 font-weight: bold; 33 font-family: FontAwesome, "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; 36 font-size: 1.1em; 45 font-size: 1.1em; 123 font-family: FontAwesome, "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; 125 font-size: 1.1em; 148 font-family: SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace; 152 font-size: 75%;
|
/lvgl-latest/src/widgets/label/ |
D | lv_label.c | 60 …uint32_t length, const lv_font_t * font, int32_t letter_space, lv_area_t * txt_coords, lv_text_fla… 336 const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN); in lv_label_get_letter_pos() local 337 const int32_t letter_height = lv_font_get_line_height(font); in lv_label_get_letter_pos() 351 …new_line_start += lv_text_get_next_line(&txt[line_start], LV_TEXT_LEN_MAX, font, letter_space, max… in lv_label_get_letter_pos() 396 int32_t x = lv_text_get_width_with_flags(bidi_txt, visual_byte_pos, font, letter_space, flag); in lv_label_get_letter_pos() 400 calculate_x_coordinate(&x, align, bidi_txt, length, font, letter_space, &txt_coords, flag); in lv_label_get_letter_pos() 427 const lv_font_t * font = lv_obj_get_style_text_font(obj, LV_PART_MAIN); in lv_label_get_letter_on() local 430 const int32_t letter_height = lv_font_get_line_height(font); in lv_label_get_letter_on() 442 …new_line_start += lv_text_get_next_line(&txt[line_start], LV_TEXT_LEN_MAX, font, letter_space, max… in lv_label_get_letter_on() 478 calculate_x_coordinate(&x, align, bidi_txt, length, font, letter_space, &txt_coords, flag); in lv_label_get_letter_on() [all …]
|
/lvgl-latest/src/draw/nema_gfx/ |
D | lv_draw_nema_gfx_label.c | 85 const lv_font_t * font, uint32_t letter); 398 const lv_font_t * font = dsc->font; in _draw_label_iterate_characters() local 417 lv_text_get_size(&p, dsc->text, dsc->font, dsc->letter_space, dsc->line_space, LV_COORD_MAX, in _draw_label_iterate_characters() 422 int32_t line_height_font = lv_font_get_line_height(font); in _draw_label_iterate_characters() 456 … line_start + lv_text_get_next_line(&dsc->text[line_start], remaining_len, font, dsc->letter_space, in _draw_label_iterate_characters() 463 …line_end += lv_text_get_next_line(&dsc->text[line_start], remaining_len, font, dsc->letter_space, … in _draw_label_iterate_characters() 478 …v_text_get_width_with_flags(&dsc->text[line_start], line_end - line_start, font, dsc->letter_space, in _draw_label_iterate_characters() 486 …v_text_get_width_with_flags(&dsc->text[line_start], line_end - line_start, font, dsc->letter_space, in _draw_label_iterate_characters() 509 int32_t underline_width = font->underline_thickness ? font->underline_thickness : 1; in _draw_label_iterate_characters() 639 letter_w = lv_font_get_glyph_width(font, letter, letter_next); in _draw_label_iterate_characters() [all …]
|
/lvgl-latest/src/misc/ |
D | lv_text.h | 85 void lv_text_get_size(lv_point_t * size_res, const char * text, const lv_font_t * font, int32_t let… 97 int32_t lv_text_get_width(const char * txt, uint32_t length, const lv_font_t * font, int32_t letter… 109 int32_t lv_text_get_width_with_flags(const char * txt, uint32_t length, const lv_font_t * font, int…
|