fix font matching issue with .ttcs holding multiple families

refs: #1137
This commit is contained in:
Wez Furlong committed 2021-09-12 13:31:21 -07:00
1 parent 53eea54fed
commit 140d9fd345
2 files changed
+2

No files matched your search

+1
View File
@@ -43,6 +43,7 @@ As features stabilize some brief notes about them will accumulate here.
* Improved: multi-click-streaks are now interrupted by the cursor moving to a different cell. Thanks to [@unrelentingtech](https://github.com/unrelentingtech)! [#1126](https://github.com/wez/wezterm/issues/1126)
* Fixed: Wayland: dragging the window using the tab bar now works. Thanks to [@unrelentingtech](https://github.com/unrelentingtech)! [#1127](https://github.com/wez/wezterm/issues/1127)
* New: X11, macOS: Window resizing now prefers to step in increments of the cell size
* Fixed: error matching a font when that font is in a .ttc that contains multiple font families. [#1137](https://github.com/wez/wezterm/issues/1137)
### 20210814-124438-54e29167
+1
View File
@@ -465,6 +465,7 @@ pub fn best_matching_font(
) -> anyhow::Result<Option<ParsedFont>> {
let mut font_info = vec![];
parse_and_collect_font_info(source, &mut font_info, origin)?;
font_info.retain(|font| font.matches_name(font_attr));
Ok(ParsedFont::best_match(font_attr, font_info))
}