#include #include namespace psemek::ui { std::unique_ptr make_msdf_font(io::istream && description, io::istream && texture) { auto data = bmfont_data::parse(std::move(description)); auto pixmap = gfx::read_png(std::move(texture)); gfx::texture_2d atlas; atlas.load(pixmap); atlas.linear_mipmap_filter(); atlas.anisotropy(); atlas.generate_mipmap(); return std::make_unique(std::move(data), std::move(atlas)); } msdf_font::msdf_font(bmfont_data data, gfx::texture_2d atlas) : kerned_font(std::move(data), std::move(atlas)) {} }