mirror of
https://github.com/wez/wezterm.git
synced 2024-11-10 15:04:32 +03:00
stubs for macos font loading
This commit is contained in:
parent
ca1c3185de
commit
c39dbdc356
@ -46,6 +46,9 @@ features = [
|
||||
]
|
||||
version = "0.2.0"
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
core-text = "9.2.0"
|
||||
|
||||
[features]
|
||||
debug-escape-sequences = ["term/debug-escape-sequences"]
|
||||
|
||||
|
20
src/font/coretext.rs
Normal file
20
src/font/coretext.rs
Normal file
@ -0,0 +1,20 @@
|
||||
//! We'll put macOS Core Text stuff in here
|
||||
use config::{Config, TextStyle};
|
||||
use failure::Error;
|
||||
use font::{FontSystem, NamedFont};
|
||||
|
||||
pub type FontSystemImpl = CoreTextSystem;
|
||||
|
||||
pub struct CoreTextSystem {}
|
||||
|
||||
impl CoreTextSystem {
|
||||
pub fn new() -> Self {
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
impl FontSystem for CoreTextSystem {
|
||||
fn load_font(&self, config: &Config, style: &TextStyle) -> Result<Box<NamedFont>, Error> {
|
||||
bail!("load_font");
|
||||
}
|
||||
}
|
@ -18,6 +18,11 @@ pub mod fontconfigandfreetype;
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
use self::fontconfigandfreetype::FontSystemImpl;
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod coretext;
|
||||
#[cfg(target_os = "macos")]
|
||||
use self::coretext::FontSystemImpl;
|
||||
|
||||
use super::config::{Config, TextStyle};
|
||||
use term::CellAttributes;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#[cfg(target_os = "macos")]
|
||||
extern crate core_text;
|
||||
extern crate egli;
|
||||
extern crate euclid;
|
||||
#[macro_use]
|
||||
|
Loading…
Reference in New Issue
Block a user