Fix boldness to be in font points

This commit is contained in:
Filip Sykala 2022-02-22 09:55:48 +01:00
parent 32573178c3
commit ebbdaf7336

View File

@ -160,7 +160,7 @@ std::optional<Emboss::Glyph> Private::get_glyph(
static_cast<int>(glyph_opt->left_side_bearing / Emboss::SHAPE_SCALE); static_cast<int>(glyph_opt->left_side_bearing / Emboss::SHAPE_SCALE);
if (font_prop.boldness.has_value()) { if (font_prop.boldness.has_value()) {
float delta = *font_prop.boldness / Emboss::SHAPE_SCALE; float delta = *font_prop.boldness / Emboss::SHAPE_SCALE / font_prop.size_in_mm;
glyph_opt->shape = offset_ex(glyph_opt->shape, delta); glyph_opt->shape = offset_ex(glyph_opt->shape, delta);
} }