@@ -164,8 +164,10 @@ auto TextRenderer::generate_glyph(FontRuntime &rt, FontData &fd,
|
||||
|
||||
msdfgen::Bitmap<float, 3> msdf_bitmap(bmp_w, bmp_h);
|
||||
msdfgen::Vector2 scale_vec(scale, scale);
|
||||
double const inv_scale = 1.0 / scale;
|
||||
msdfgen::Vector2 translate(
|
||||
-bounds.l * scale + rt.px_range, -bounds.b * scale + rt.px_range);
|
||||
-bounds.l + rt.px_range * inv_scale,
|
||||
-bounds.b + rt.px_range * inv_scale);
|
||||
msdfgen::generateMSDF(msdf_bitmap, shape, rt.px_range, scale_vec, translate);
|
||||
|
||||
std::vector<Color> buffer(static_cast<size_t>(bmp_w) * bmp_h);
|
||||
|
||||
Reference in New Issue
Block a user