#include <msp/gl/immediate.h>
#include <msp/gl/matrix.h>
+#include <msp/gl/texture2d.h>
#include "style.h"
#include "text.h"
if(!style || lines.empty())
return;
+ const GL::Font *font = style->get_font();
const GL::Color &color = style->get_font_color();
GL::Immediate imm((GL::COLOR4_UBYTE, GL::TEXCOORD2, GL::VERTEX2));
imm.color(color.r, color.g, color.b);
RenderData data;
data.bld = &imm;
+ GL::Bind bind_tex(font->get_texture());
+
process_lines<RenderData, &Text::render_line>(part, parent, first_row, data);
}
GL::translate(rgeom.x, rgeom.y, 0);
GL::scale_uniform(font->get_default_size());
- font->draw_string(text.substr(line.start, line.length), *data.bld);
+ font->build_string(text.substr(line.start, line.length), *data.bld);
}
void Text::coords_to_geom_line(unsigned i, const Geometry &rgeom, CoordsToGeomData &data) const