Function glium_text_rusttype::draw
[−]
[src]
pub fn draw<F, S: ?Sized, M>(
text: &TextDisplay<F>,
system: &TextSystem,
target: &mut S,
matrix: M,
color: (f32, f32, f32, f32)
) -> Result<(), DrawError> where
S: Surface,
M: Into<[[f32; 4]; 4]>,
F: Deref<Target = FontTexture>,
Draws linear-filtered text.
About the matrix
The matrix must be column-major post-muliplying (which is the usual way to do in OpenGL).
One unit in height corresponds to a line of text, but the text can go above or under.
The bottom of the line is at 0.0
, the top is at 1.0
.
You need to adapt your matrix by taking these into consideration.