fix(tinyttf): remove duplicated code (#5158)
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
@@ -233,9 +233,6 @@ static bool ttf_get_glyph_dsc_cb(const lv_font_t * font, lv_font_glyph_dsc_t * d
|
|||||||
int advw, lsb;
|
int advw, lsb;
|
||||||
stbtt_GetGlyphHMetrics(&dsc->info, g1, &advw, &lsb);
|
stbtt_GetGlyphHMetrics(&dsc->info, g1, &advw, &lsb);
|
||||||
int k = stbtt_GetGlyphKernAdvance(&dsc->info, g1, g2);
|
int k = stbtt_GetGlyphKernAdvance(&dsc->info, g1, g2);
|
||||||
dsc_out->adv_w = (uint16_t)floor((((float)advw + (float)k) * dsc->scale) +
|
|
||||||
0.5f); /*Horizontal space required by the glyph in [px]*/
|
|
||||||
|
|
||||||
dsc_out->adv_w = (uint16_t)floor((((float)advw + (float)k) * dsc->scale) +
|
dsc_out->adv_w = (uint16_t)floor((((float)advw + (float)k) * dsc->scale) +
|
||||||
0.5f); /*Horizontal space required by the glyph in [px]*/
|
0.5f); /*Horizontal space required by the glyph in [px]*/
|
||||||
dsc_out->box_w = (x2 - x1 + 1); /*width of the bitmap in [px]*/
|
dsc_out->box_w = (x2 - x1 + 1); /*width of the bitmap in [px]*/
|
||||||
|
|||||||
Reference in New Issue
Block a user