Although the content bottoms are listed as the same, the alignee is always below the reference, regardless of which uses the bigger font. I may be misunderstanding the content area, but how can I find the true bottom of the text which is drawn?
Going back to this problem after a while I made a function which aligns the baseline of one object to the baseline of another based on the above reply:
int align_text_base_line_to(lv_obj_t *obj, lv_obj_t *base) {
const lv_font_t *obj_font = lv_obj_get_style_text_font(obj, LV_PART_MAIN);
const lv_font_t *base_font = lv_obj_get_style_text_font(base, LV_PART_MAIN);
if (!obj_font || !base_font)
return -1;
int y = base_font->line_height - base_font->base_line;
y -= obj_font->line_height - obj_font->base_line;
lv_obj_set_y(obj, lv_obj_get_y(base) + y);
return 0;
}
Thank you for your help. Hope this cuts a corner off the next person trying to do this.