mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 12:23:46 +03:00
Allow specifying distinct load and render targets
refs: https://github.com/wez/wezterm/issues/639
This commit is contained in:
parent
5cd414244d
commit
b03300404a
@ -743,6 +743,8 @@ pub struct Config {
|
||||
|
||||
#[serde(default)]
|
||||
pub freetype_load_target: FreeTypeLoadTarget,
|
||||
#[serde(default)]
|
||||
pub freetype_render_target: Option<FreeTypeLoadTarget>,
|
||||
#[serde(default, deserialize_with = "FreeTypeLoadFlags::de_string")]
|
||||
pub freetype_load_flags: FreeTypeLoadFlags,
|
||||
|
||||
|
@ -46,7 +46,10 @@ pub fn compute_load_flags_from_config() -> (i32, FT_Render_Mode) {
|
||||
let config = configuration();
|
||||
|
||||
let load_flags = config.freetype_load_flags.bits() | FT_LOAD_COLOR;
|
||||
let render = match config.freetype_load_target {
|
||||
let render = match config
|
||||
.freetype_render_target
|
||||
.unwrap_or(config.freetype_load_target)
|
||||
{
|
||||
FreeTypeLoadTarget::Mono => FT_Render_Mode::FT_RENDER_MODE_MONO,
|
||||
FreeTypeLoadTarget::Normal => FT_Render_Mode::FT_RENDER_MODE_NORMAL,
|
||||
FreeTypeLoadTarget::Light => FT_Render_Mode::FT_RENDER_MODE_LIGHT,
|
||||
|
Loading…
Reference in New Issue
Block a user