B:BD[
4.1287] → [
4.1287:1555]
let (metrics, data) = self.fonts.rasterize_glyph(font, ginfo[i].glyph_id as u16);
let x_off = gpos[i].x_offset * font_size / upe + metrics.xmin;
let y_off = gpos[i].y_offset * font_size / upe - metrics.ymin - metrics.height as i32;
let ginfo = glyph_buffer.glyph_infos()[i];
let gpos = glyph_buffer.glyph_positions()[i];
let (metrics, data) = self.fonts.rasterize_glyph(font, ginfo.glyph_id as u16);
if face.bg != Color::BuiltinColor(BuiltinColor::Default) {
for row in 0..line_height {
for column in 0..(gpos.x_advance * font_size / upe) {
let x = pos.0 + column as i32;
let y = pos.1 - row as i32;
let bidx = ((x + y * self.size.0 as i32) * 4) as usize;
let bg = face.bg.to_rgba([0, 0, 0, 255]);
for i in 0..4 {
buf[bidx + i] = bg[i];
}
}
}
}
let x_off = gpos.x_offset * font_size / upe + metrics.xmin;
let y_off = gpos.y_offset * font_size / upe - metrics.ymin - metrics.height as i32;