mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-01 14:12:02 +08:00
Base line on third of ascent is better
This commit is contained in:
parent
331bfaa556
commit
2471e072d3
@ -1096,11 +1096,11 @@ bool get_line_height_offset(/* const*/ StyleManager &style_manager, double &line
|
||||
const FontProp &fp = style_manager.get_font_prop();
|
||||
const FontFile &ff = *ff_ptr;
|
||||
|
||||
double half_ascent_shape_size = ff.infos[fp.collection_number.value_or(0)].ascent / 2.;
|
||||
double third_ascent_shape_size = ff.infos[fp.collection_number.value_or(0)].ascent / 3.;
|
||||
int line_height_shape_size = get_line_height(ff, fp); // In shape size
|
||||
|
||||
double scale = get_shape_scale(fp, ff);
|
||||
line_offset_mm = half_ascent_shape_size * scale / SHAPE_SCALE;
|
||||
line_offset_mm = third_ascent_shape_size * scale / SHAPE_SCALE;
|
||||
line_height_mm = line_height_shape_size * scale;
|
||||
|
||||
if (line_height_mm < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user