fonts: tidy up fontconfig charset acceleration
and add a changelog entry! refs: #250
This commit is contained in:
1 parent
466e5cab21
commit
86f0bae1db
4 files changed
+4
-5
No files matched your search
@@ -33,6 +33,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* Fixed: invisible I-beam or underline cursor when `force_reverse_video_cursor = true` [#1076](https://github.com/wez/wezterm/issues/1076)
|
||||
* Fixed: `SU` (scroll up) sequence would fill with default-blank cells instead of blank-cells-with-current-bg-color. [#1102](https://github.com/wez/wezterm/issues/1102)
|
||||
* Fixed: X11: computed but did not use the correct DPI for HiDPI screens [#947](https://github.com/wez/wezterm/issues/947)
|
||||
* Improved: performance when resolving fallback fonts via fontconfig, and of coverage calculation with freetype. Thanks to [@H-M-H](https://github.com/H-M-H)!
|
||||
|
||||
### 20210814-124438-54e29167
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ impl FontLocator for FontConfigFontLocator {
|
||||
index,
|
||||
variation,
|
||||
origin: FontOrigin::FontConfig,
|
||||
coverage: Some(pat.get_charset()?.to_range_set())
|
||||
coverage: pat.get_charset().ok().map(|c| c.to_range_set()),
|
||||
};
|
||||
|
||||
// fontconfig will give us a boatload of random fallbacks.
|
||||
@@ -158,7 +158,7 @@ impl FontLocator for FontConfigFontLocator {
|
||||
index: pat.get_integer("index")?.try_into()?,
|
||||
variation: 0,
|
||||
origin: FontOrigin::FontConfig,
|
||||
coverage: Some(pat.get_charset()?.to_range_set())
|
||||
coverage: pat.get_charset().ok().map(|c| c.to_range_set()),
|
||||
};
|
||||
if let Ok(parsed) = crate::parser::ParsedFont::from_locator(&handle) {
|
||||
fonts.push(parsed);
|
||||
|
||||
@@ -114,7 +114,7 @@ pub struct FontDataHandle {
|
||||
pub index: u32,
|
||||
pub variation: u32,
|
||||
pub origin: FontOrigin,
|
||||
pub coverage: Option<rangeset::RangeSet<u32>>
|
||||
pub coverage: Option<rangeset::RangeSet<u32>>,
|
||||
}
|
||||
|
||||
impl PartialOrd for FontDataHandle {
|
||||
|
||||
@@ -448,7 +448,6 @@ pub(crate) fn load_built_in_fonts(font_info: &mut Vec<ParsedFont>) -> anyhow::Re
|
||||
index: 0,
|
||||
variation: 0,
|
||||
origin: FontOrigin::BuiltIn,
|
||||
// TODO: precompute this!
|
||||
coverage: None,
|
||||
};
|
||||
let face = lib.face_from_locator(&locator)?;
|
||||
@@ -489,7 +488,6 @@ pub(crate) fn parse_and_collect_font_info(
|
||||
index,
|
||||
variation: 0,
|
||||
origin,
|
||||
// TODO: ???
|
||||
coverage: None,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user