1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

font folder restructure and makefile fixes

This commit is contained in:
Gabor Kiss-Vamosi 2019-06-06 05:55:17 +02:00
parent 9139b58abc
commit 48e1efb6ef
22 changed files with 35 additions and 52 deletions

4
lvgl.h
View File

@ -30,8 +30,8 @@ extern "C" {
#include "src/lv_themes/lv_theme.h"
#include "src/lv_misc/lv_font.h"
#include "src/lv_misc/lv_font_fmt/lv_font_fmt_txt.h"
#include "src/lv_font/lv_font.h"
#include "src/lv_font/lv_font_fmt_txt.h"
#include "src/lv_objx/lv_btn.h"
#include "src/lv_objx/lv_imgbtn.h"

View File

@ -1,7 +1,7 @@
include $(LVGL_DIR)/lvgl/src/lv_core/lv_core.mk
include $(LVGL_DIR)/lvgl/src/lv_hal/lv_hal.mk
include $(LVGL_DIR)/lvgl/src/lv_objx/lv_objx.mk
include $(LVGL_DIR)/lvgl/src/lv_fonts/lv_fonts.mk
include $(LVGL_DIR)/lvgl/src/lv_font/lv_font.mk
include $(LVGL_DIR)/lvgl/src/lv_misc/lv_misc.mk
include $(LVGL_DIR)/lvgl/src/lv_themes/lv_themes.mk
include $(LVGL_DIR)/lvgl/src/lv_draw/lv_draw.mk

View File

@ -14,9 +14,9 @@ extern "C" {
* INCLUDES
*********************/
#include <stdbool.h>
#include "../lv_font/lv_font.h"
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
#include "../lv_misc/lv_anim.h"
/*********************

View File

@ -11,8 +11,8 @@
#include "../lv_core/lv_refr.h"
#include "../lv_hal/lv_hal.h"
#include "../lv_font/lv_font.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_log.h"

View File

@ -19,9 +19,9 @@ extern "C" {
#include "../../../lv_conf.h"
#endif
#include "../lv_font/lv_font.h"
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
/*********************
* DEFINES

View File

@ -8,8 +8,8 @@
*********************/
#include "lv_font.h"
#include "lv_log.h"
#include "lv_utils.h"
#include "../lv_misc/lv_utils.h"
#include "../lv_misc/lv_log.h"
/*********************
* DEFINES

11
src/lv_font/lv_font.mk Normal file
View File

@ -0,0 +1,11 @@
CSRCS += lv_font.c
CSRCS += lv_font_fmt_txt.c
CSRCS += lv_font_roboto_12.c
CSRCS += lv_font_roboto_16.c
CSRCS += lv_font_roboto_22.c
CSRCS += lv_font_roboto_28.c
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_font
VPATH += :$(LVGL_DIR)/lvgl/src/lv_font
CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_font"

View File

@ -7,10 +7,10 @@
* INCLUDES
*********************/
#include "../lv_font.h"
#include "../lv_log.h"
#include "../lv_utils.h"
#include "lv_font.h"
#include "lv_font_fmt_txt.h"
#include "../lv_misc/lv_log.h"
#include "../lv_misc/lv_utils.h"
/*********************
* DEFINES
@ -25,7 +25,7 @@
**********************/
static uint32_t get_glyph_dsc_id(const lv_font_t * font, uint32_t letter);
static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t gid_right);
static int32_t lv_font_codeCompare(const void * pRef, const void * pElement);
//static int32_t lv_font_codeCompare(const void * pRef, const void * pElement);
/**********************
* STATIC VARIABLES
@ -78,11 +78,9 @@ bool lv_font_get_glyph_dsc_fmt_txt(const lv_font_t * font, lv_font_glyph_dsc_t *
if(!gid) return false;
int8_t kvalue = 0;
const lv_font_fmt_txt_glyph_dsc_t * gdsc_next = NULL;
if(fdsc->kern_dsc) {
uint32_t gid_next = get_glyph_dsc_id(font, unicode_letter_next);
if(gid_next) {
gdsc_next = &fdsc->glyph_dsc[gid_next];
kvalue = get_kern_value(font, gid, gid_next);
}
}
@ -213,7 +211,7 @@ static int8_t get_kern_value(const lv_font_t * font, uint32_t gid_left, uint32_t
* @retval > 0 Reference is less than element.
*
*/
static int32_t lv_font_codeCompare(const void * pRef, const void * pElement)
{
return (*(uint16_t *)pRef) - (*(uint16_t *)pElement);
}
//static int32_t lv_font_codeCompare(const void * pRef, const void * pElement)
//{
// return (*(uint16_t *)pRef) - (*(uint16_t *)pElement);
//}

View File

@ -16,14 +16,13 @@ extern "C" {
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../../../lv_conf.h"
#include "../../../lv_conf.h"
#endif
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "../lv_font.h"
#include "lv_font.h"
/*********************
* DEFINES

View File

@ -1,23 +0,0 @@
CSRCS += lv_font_builtin.c
CSRCS += lv_font_dejavu_10.c
CSRCS += lv_font_dejavu_20.c
CSRCS += lv_font_dejavu_30.c
CSRCS += lv_font_dejavu_40.c
CSRCS += lv_font_dejavu_10_cyrillic.c
CSRCS += lv_font_dejavu_20_cyrillic.c
CSRCS += lv_font_dejavu_30_cyrillic.c
CSRCS += lv_font_dejavu_40_cyrillic.c
CSRCS += lv_font_dejavu_10_latin_sup.c
CSRCS += lv_font_dejavu_20_latin_sup.c
CSRCS += lv_font_dejavu_30_latin_sup.c
CSRCS += lv_font_dejavu_40_latin_sup.c
CSRCS += lv_font_symbol_10.c
CSRCS += lv_font_symbol_20.c
CSRCS += lv_font_symbol_30.c
CSRCS += lv_font_symbol_40.c
CSRCS += lv_font_monospace_8.c
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/src/lv_fonts
VPATH += :$(LVGL_DIR)/lvgl/src/lv_fonts
CFLAGS += "-I$(LVGL_DIR)/lvgl/src/lv_fonts"

View File

@ -1,4 +1,3 @@
CSRCS += lv_font.c
CSRCS += lv_circ.c
CSRCS += lv_area.c
CSRCS += lv_task.c

View File

@ -191,8 +191,8 @@ uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord
/*Check for new line chars*/
if(letter == '\n' || letter == '\r') {
uint32_t i_tmp = i;
uint32_t letter_next = lv_txt_encoded_next(txt, &i_tmp);
if(letter == '\r' && letter_next == '\n') i = i_tmp;
uint32_t n = lv_txt_encoded_next(txt, &i_tmp);
if(letter == '\r' && n == '\n') i = i_tmp;
return i; /*Return with the first letter of the next line*/

View File

@ -21,8 +21,8 @@ extern "C" {
#include <stdbool.h>
#include "lv_area.h"
#include "lv_font.h"
#include "lv_area.h"
#include "../lv_font/lv_font.h"
/*********************
* DEFINES

View File

@ -13,7 +13,7 @@
#include "../lv_core/lv_group.h"
#include "../lv_core/lv_indev.h"
#include "../lv_themes/lv_theme.h"
#include "../lv_misc/lv_symbol_def.h"
#include "../lv_font/lv_symbol_def.h"
#include "../lv_misc/lv_anim.h"
#include "../lv_misc/lv_math.h"
#include <string.h>

View File

@ -23,7 +23,6 @@ extern "C" {
#include "../lv_core/lv_obj.h"
#include "../lv_misc/lv_fs.h"
#include "../lv_misc/lv_symbol_def.h"
#include "lv_label.h"
#include "../lv_draw/lv_draw.h"

View File

@ -22,9 +22,9 @@ extern "C" {
#if LV_USE_LABEL != 0
#include "../lv_core/lv_obj.h"
#include "../lv_misc/lv_font.h"
#include "../lv_font/lv_font.h"
#include "../lv_font/lv_symbol_def.h"
#include "../lv_misc/lv_txt.h"
#include "../lv_misc/lv_symbol_def.h"
/*********************
* DEFINES