1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 23:21:08 +03:00

wezterm-font: remove some dead code

This commit is contained in:
Wez Furlong 2020-11-21 08:27:44 -08:00
parent 3bd8d8c845
commit 69d56fc868

View File

@ -453,11 +453,6 @@ impl ParsedFont {
)?;
}
// Note: init_from_glyphs silently elides entries that
// have no glyph in the current font! we need to deal
// with this so that we can perform font fallback, so
// we pass a copy of the glyphs here and detect this
// during below.
let mut infos = Info::init_from_glyphs(self.gdef_table.as_ref(), glyphs)?;
if let Some(gpos_cache) = self.gpos_cache.as_ref() {
let kerning = true;
@ -478,21 +473,12 @@ impl ParsedFont {
for glyph_info in infos.into_iter() {
let glyph_index = glyph_info.glyph.glyph_index;
//.ok_or_else(|| anyhow!("no mapped glyph_index for {:?}", glyph_info))?;
let horizontal_advance = i32::from(
self.hmtx
.horizontal_advance(glyph_index, self.hhea.num_h_metrics)?,
);
/*
let width = if glyph_info.kerning != 0 {
horizontal_advance + i32::from(glyph_info.kerning)
} else {
horizontal_advance
};
*/
// Adjust for distance placement
let (x_advance, y_advance) = match glyph_info.placement {
Placement::Distance(dx, dy) => (horizontal_advance + dx, dy),