Repository: wezterm/wezterm (language: rust)

Issue:
freetype_load_target doesn't work
### What Operating System(s) are you seeing this problem on?

Linux X11

### Which Wayland compositor or X11 Window manager(s) are you using?

Compiz

### WezTerm version

20240103-143005-4921f139

### Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

### Describe the bug

freetype_load_target is ignored.

### To Reproduce

_No response_

### Configuration

  config.freetype_load_target = "Light"
  config.freetype_render_target = "HorizontalLcd"
  config.freetype_interpreter_version = 40
  config.font = wezterm.font({ family = 'Roboto Mono', weight = 600 })
  config.font_size = 9

### Expected Behavior

freetype_load_target = "Light":

![zsh_003](https://github.com/wez/wezterm/assets/2834375/4c833742-e50b-4fc0-857c-ec533c7c7c8e)

freetype_load_target = "Normal":

![zsh_004](https://github.com/wez/wezterm/assets/2834375/6b05ed4a-b228-49f5-9133-2b5154ee5cfb)

### Logs

_No response_

### Anything else?

I think there should be extra parentheses in the render_mode_to_load_target function, otherwise the load_flags gets calculated incorrectly:

((render_mode as u32) & 15) << 16



Discussion / hints:

Fix patch:
diff --git a/wezterm-font/src/ftwrap.rs b/wezterm-font/src/ftwrap.rs
index 2a60730c1b6..231c3fa1942 100644
--- a/wezterm-font/src/ftwrap.rs
+++ b/wezterm-font/src/ftwrap.rs
@@ -51,7 +51,7 @@ fn render_mode_to_load_target(render_mode: FT_Render_Mode) -> u32 {
     // for these in the bindings so we do some bit magic for
     // ourselves.  This is how the FT_LOAD_TARGET_() macro
     // assembles these bits.
-    (render_mode as u32) & 15 << 16
+    ((render_mode as u32) & 15) << 16
 }
 
 pub fn compute_load_flags_from_config(


Test patch: