Re: [dev] [st] incorrect italic, bold, bold italic versions

2022-08-06 Thread Roberto E. Vargas Caballero
Hi,

On Sat, Aug 06, 2022 at 04:55:47AM +0600, NRK wrote:
> The font2 patch[0] on the wiki kinda enables fallback fonts. But I
> didn't like the fact that it adds a separate array `font2`. IMO you
> should be able to do this, similar to dmenu/dwm:
> 
>   static const char *fonts[] = {
>   "font0",
>   "font1",
>   "font2",
>   };
> 
> And ST would/should prioritize `font0` and then fallback to
> `font1 -> font2 -> ..` etc before attempting it's own heuristics.


I agree with you, it seems a more reasonable way of dealing with the issue.
I don't know what Evil_Bob thinks about it, but I personally would go
to introduce that change in the mainline of st.

Regards,



Re: [dev] [st] incorrect italic, bold, bold italic versions

2022-08-05 Thread NRK
On Fri, Aug 05, 2022 at 11:55:39PM +0300, Plato Kiorpelidis wrote:
> Sometimes FcFontMatch in xloadfont does not match the font the user expects.
> This happens because fontconfig attempts to find a matching font using
> heuristics. To deal with this I wrote a patch[1] that allows the user to
> explicitly state the prefered italic, bold and bold italic fonts.

I think the bigger issue here is the fact that ST doesn't allow user to
specify the fallback fonts in config.h. DWM and Dmenu on the other hand
do.

The font2 patch[0] on the wiki kinda enables fallback fonts. But I
didn't like the fact that it adds a separate array `font2`. IMO you
should be able to do this, similar to dmenu/dwm:

static const char *fonts[] = {
"font0",
"font1",
"font2",
};

And ST would/should prioritize `font0` and then fallback to
`font1 -> font2 -> ..` etc before attempting it's own heuristics.

[0]: https://st.suckless.org/patches/font2/

- NRK



[dev] [st] incorrect italic, bold, bold italic versions

2022-08-05 Thread Plato Kiorpelidis
Sometimes FcFontMatch in xloadfont does not match the font the user 
expects. This happens because fontconfig attempts to find a matching 
font using heuristics. To deal with this I wrote a patch[1] that 
allows the user to explicitly state the prefered italic, bold and 
bold italic fonts.


My question is: is this considered a patch for wiki or mainline?

[1]: 
https://github.com/kioplato/st/commit/0446a61dea2dac3ea2854975f510c228ac43d151

Thanks,
Plato Kiorpelidis