add harfbuzz shaping stats

This commit is contained in:
Wez Furlong committed 2020-01-05 14:37:17 -08:00
1 parent 4f5441deb6
commit 43dd7dd03b
1 file changed
+4 -1
+4 -1
View File
@@ -251,7 +251,10 @@ impl HarfbuzzShaper {
impl FontShaper for HarfbuzzShaper {
fn shape(&self, text: &str, size: f64, dpi: u32) -> anyhow::Result<Vec<GlyphInfo>> {
self.do_shape(0, text, size, dpi)
let start = std::time::Instant::now();
let result = self.do_shape(0, text, size, dpi);
metrics::value!("shape.harfbuzz", start.elapsed());
result
}
fn metrics(&self, size: f64, dpi: u32) -> anyhow::Result<FontMetrics> {