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

fix(tinyttf): remove duplicated code (#5158)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu 2024-01-02 18:03:38 +08:00 committed by GitHub
parent 95e40c4652
commit 39193010a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
stbtt_GetGlyphHMetrics(&dsc->info, g1, &advw, &lsb);
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) +
0.5f); /*Horizontal space required by the glyph in [px]*/
dsc_out->box_w = (x2 - x1 + 1); /*width of the bitmap in [px]*/