BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lvgl
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
lvgl
Commits
ebfe8fbf
Commit
ebfe8fbf
authored
Sep 27, 2017
by
Gabor Kiss-Vamosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to the new font desciption
parent
1bbe6e10
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
lv_draw.c
lv_draw/lv_draw.c
+1
-1
lv_draw_rbasic.c
lv_draw/lv_draw_rbasic.c
+8
-8
lv_draw_vbasic.c
lv_draw/lv_draw_vbasic.c
+9
-7
lv_ta.c
lv_objx/lv_ta.c
+1
-1
No files found.
lv_draw/lv_draw.c
View file @
ebfe8fbf
...
...
@@ -288,7 +288,7 @@ void lv_draw_label(const area_t * cords_p,const area_t * mask_p, const lv_style_
if
((
flag
&
TXT_FLAG_RECOLOR
)
!=
0
)
{
if
(
letter
==
TXT_RECOLOR_CMD
)
{
if
(
cmd_state
==
CMD_STATE_WAIT
)
{
/*Start char*/
par_start
=
i
+
txt_utf8_size
(
&
txt
[
i
]);
par_start
=
i
+
txt_utf8_size
(
txt
[
i
]);
cmd_state
=
CMD_STATE_PAR
;
continue
;
}
else
if
(
cmd_state
==
CMD_STATE_PAR
)
{
/*Other start char in parameter escaped cmd. char */
...
...
lv_draw/lv_draw_rbasic.c
View file @
ebfe8fbf
...
...
@@ -95,6 +95,7 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
color_t
color
,
opa_t
opa
)
{
uint8_t
w
=
font_get_width
(
font_p
,
letter
);
const
uint8_t
*
bitmap_p
=
font_get_bitmap
(
font_p
,
letter
);
uint8_t
col
,
col_sub
,
row
;
...
...
@@ -110,15 +111,14 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
col_sub
=
8
;
}
}
/*Correction if the letter is short*/
bitmap_p
+=
font_p
->
width_byte
-
((
w
>>
3
)
+
1
);
/*Go to the next row*/
bitmap_p
++
;
}
#else
uint8_t
width_byte
=
w
>>
3
;
/*Width in bytes (e.g. w = 11 -> 2 bytes wide)*/
if
(
w
&
0x7
)
width_byte
++
;
const
uint8_t
*
map1_p
=
bitmap_p
;
const
uint8_t
*
map2_p
=
bitmap_p
+
font_p
->
width_byte
;
const
uint8_t
*
map2_p
=
bitmap_p
+
width_byte
;
uint8_t
px_cnt
;
uint8_t
col_byte_cnt
;
for
(
row
=
0
;
row
<
(
font_p
->
height_row
>>
1
);
row
++
)
{
...
...
@@ -152,10 +152,10 @@ void lv_rletter(const point_t * pos_p, const area_t * mask_p,
}
}
map1_p
+=
font_p
->
width_byte
;
map2_p
+=
font_p
->
width_byte
;
map1_p
+=
font_p
->
width_byte
-
col_byte_cnt
;
map2_p
+=
font_p
->
width_byte
-
col_byte_cnt
;
map1_p
+=
width_byte
;
map2_p
+=
width_byte
;
map1_p
+=
width_byte
-
col_byte_cnt
;
map2_p
+=
width_byte
-
col_byte_cnt
;
}
#endif
}
...
...
lv_draw/lv_draw_vbasic.c
View file @
ebfe8fbf
...
...
@@ -170,6 +170,8 @@ void lv_vletter(const point_t * pos_p, const area_t * mask_p,
cord_t
col
,
row
;
uint8_t
col_bit
;
uint8_t
col_byte_cnt
;
uint8_t
width_byte
=
letter_w
>>
3
;
/*Width in bytes (e.g. w = 11 -> 2 bytes wide)*/
if
(
letter_w
&
0x7
)
width_byte
++
;
/* Calculate the col/row start/end on the map
* If font anti alaiassing is enabled use the reduced letter sizes*/
...
...
@@ -186,13 +188,13 @@ void lv_vletter(const point_t * pos_p, const area_t * mask_p,
vdb_buf_tmp
+=
(
row_start
*
vdb_width
)
+
col_start
;
/*Move on the map too*/
map_p
+=
((
row_start
<<
FONT_ANTIALIAS
)
*
font_p
->
width_byte
)
+
((
col_start
<<
FONT_ANTIALIAS
)
>>
3
);
map_p
+=
((
row_start
<<
FONT_ANTIALIAS
)
*
width_byte
)
+
((
col_start
<<
FONT_ANTIALIAS
)
>>
3
);
#if FONT_ANTIALIAS != 0
opa_t
opa_tmp
=
opa
;
if
(
opa_tmp
!=
OPA_COVER
)
opa_tmp
=
opa_tmp
>>
2
;
/*Opacity per pixel (used when sum the pixels)*/
const
uint8_t
*
map1_p
=
map_p
;
const
uint8_t
*
map2_p
=
map_p
+
font_p
->
width_byte
;
const
uint8_t
*
map2_p
=
map_p
+
width_byte
;
uint8_t
px_cnt
;
for
(
row
=
row_start
;
row
<
row_end
;
row
++
)
{
col_byte_cnt
=
0
;
...
...
@@ -228,10 +230,10 @@ void lv_vletter(const point_t * pos_p, const area_t * mask_p,
vdb_buf_tmp
++
;
}
map1_p
+=
font_p
->
width_byte
;
map2_p
+=
font_p
->
width_byte
;
map1_p
+=
font_p
->
width_byte
-
col_byte_cnt
;
map2_p
+=
font_p
->
width_byte
-
col_byte_cnt
;
map1_p
+=
width_byte
;
map2_p
+=
width_byte
;
map1_p
+=
width_byte
-
col_byte_cnt
;
map2_p
+=
width_byte
-
col_byte_cnt
;
vdb_buf_tmp
+=
vdb_width
-
((
col_end
)
-
(
col_start
));
/*Next row in VDB*/
}
#else
...
...
@@ -255,7 +257,7 @@ void lv_vletter(const point_t * pos_p, const area_t * mask_p,
}
}
map_p
+=
font_p
->
width_byte
-
col_byte_cnt
;
map_p
+=
width_byte
-
col_byte_cnt
;
vdb_buf_tmp
+=
vdb_width
-
(
col_end
-
col_start
);
/*Next row in VDB*/
}
#endif
...
...
lv_objx/lv_ta.c
View file @
ebfe8fbf
...
...
@@ -209,7 +209,7 @@ bool lv_ta_signal(lv_obj_t * ta, lv_signal_t sign, void * param)
/**
* Insert a character to the current cursor position
* @param ta pointer to a text area object
* @param c a character
* @param c a character
(could but UTF-8 code as well: 'Á' or txt_unicode_to_utf8(0x047C)
*/
void
lv_ta_add_char
(
lv_obj_t
*
ta
,
uint32_t
c
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment