mirror of
https://github.com/wez/wezterm.git
synced 2024-12-18 02:42:05 +03:00
fonts: fixup compilation on mac+windows
This commit is contained in:
parent
61776aa5a3
commit
10b903afd8
@ -197,19 +197,6 @@ impl Library {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "macos", windows))]
|
||||
pub fn load_font_kit_handle(&self, handle: &font_kit::handle::Handle) -> Result<Face, Error> {
|
||||
use font_kit::handle::Handle;
|
||||
match handle {
|
||||
Handle::Path { path, font_index } => {
|
||||
self.new_face(path.to_str().unwrap(), *font_index as _)
|
||||
}
|
||||
Handle::Memory { bytes, font_index } => {
|
||||
self.new_face_from_slice(&bytes, *font_index as _)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn new_face<P>(&self, path: P, face_index: FT_Long) -> Result<Face, Error>
|
||||
where
|
||||
|
@ -1,13 +1,10 @@
|
||||
use crate::config::FontAttributes;
|
||||
use crate::font::loader::{FontDataHandle, FontLocator};
|
||||
use ::font_kit::error::SelectionError;
|
||||
use ::font_kit::family_handle::FamilyHandle;
|
||||
use crate::font::locator::{FontDataHandle, FontLocator};
|
||||
use ::font_kit::family_name::FamilyName;
|
||||
use ::font_kit::handle::Handle;
|
||||
use ::font_kit::properties::Properties;
|
||||
use ::font_kit::source::Source;
|
||||
use failure::Fallible;
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// A FontLocator implemented using the font loading
|
||||
/// functions provided by Source's from font-kit crate.
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::config::FontAttributes;
|
||||
use crate::font::loader::{FontDataHandle, FontLocator};
|
||||
use crate::font::locator::{FontDataHandle, FontLocator};
|
||||
use ::font_loader::system_fonts;
|
||||
use failure::Fallible;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
//! This module uses the allsorts crate to parse font data.
|
||||
//! At this time it is used only to extract name information,
|
||||
//! but in the future I'd like to use its shaping functionality
|
||||
#![allow(dead_code)]
|
||||
use crate::config::Config;
|
||||
use crate::config::FontAttributes;
|
||||
use crate::font::locator::FontDataHandle;
|
||||
|
Loading…
Reference in New Issue
Block a user