LGUG2Z / komorebi

A tiling window manager for Windows 🍉
https://lgug2z.github.io/komorebi/
Other
7.86k stars 155 forks source link

[FEAT]: Stacked tabs font adjustment #868

Closed ttofano closed 6 days ago

ttofano commented 1 month ago

Man, I gottaa say, I'm in love with komorebi! TYSM for your effort! Now, one thing I noticed is that (at least in my setup) komorebi-gui and stacked windows tabs have some janky fonts (maybe I am missing some fonts on my system - I'm on a fresh Win install). They are quite big and get cropped out of both the GUI and the Tabs names (screenshots at the end):

Describe the solution you'd like Although it could be my setup simply lacking some fonts, the ability to set fontaces for the tabs and the GUI would be great! I guess this would add a level of personalization.

Additional context

image This is the GUI and my Windows Terminal in background (as you can see, my system is configured to use quite small fonts)

image This is the tabs for stacked windows - I recon it is using the same font as the GUI?

Anyways, if the issue is my system, I apologize for the trouble. Could you please tell me what font are the tabs names and the GUI looking for in my system? Cheers! o/

GaussianWonder commented 2 weeks ago

It would be great if we could change the font family, size and weight.

LGUG2Z commented 6 days ago

https://github.com/LGUG2Z/komorebi/commit/9fb6f8ebcd2671956234303e926467b5ce5dc39b

Probably not going to add anything for the debug GUI because I want to keep it as close as possible to stock-egui to make upgrades less painful.

ttofano commented 6 days ago

My apologies, @LGUG2Z, I think I wasn't clear enough.

My request was to enable customization of the tab's font family, face and weight, not the GUI's.

I used the GUI on my system as an example, as I believe both the tabs names and the GUI are using the same font config by default (and, in my system, those fonts are too big and take a lot of screen real estate, rendering the stacking feature almost useless to me).

If I could customize the tabs fonts, I could set a specific size for them (and custom faces and weight, if I'd like to), making them smaller, saving me some screen space when I decide to stack windows.

Enabling tabs font customization would also save you trouble trying to find "one size and face to rule them all"; each user can set the fonts to their own liking.

Hope this clarifies the request.

LGUG2Z commented 6 days ago

Changes to customize the font family and size are now on master:

image

  "stackbar": {
    "height": 40,
    "mode": "OnStack",
    "label": "Title",
    "tabs": {
      "width": 300,
      "focused_text": "#00a542",
      "unfocused_text": "#b3b3b3",
      "background": "#141414",
      "font_family": "JetBrains Mono",
      "font_size": 34
    }
  },

I might try to add in customizing font weights too later, but I need to think about how to expose the various FW_* Win32 constants as something more approachable in the configuration file.