i3 / i3lock

improved screen locker
https://i3wm.org/i3lock
BSD 3-Clause "New" or "Revised" License
921 stars 404 forks source link

How to specify custom font #174

Closed mateuszlewko closed 6 years ago

mateuszlewko commented 6 years ago

How do I specify a custom font used for clock and text? I see there is an option --timefont, but I don't know what should I specify. Let's say I have a font called "DejaVu Serif Bold". Specifying this name doesn't change anything. What am I doing wrong?

Airblader commented 6 years ago

How do I specify a custom font used for clock and text?

You can't.

I see there is an option --timefont

Not sure where you see that, but no such option exists.

orestisfl commented 6 years ago

This is probably from some fork. https://github.com/Jereviendrai/i3lock-color/commit/2193acef3b525a84b3102bb0b06a8bf5a99efbcb from a quick search

re1 commented 6 years ago

Is there a specific reason why setting a font and size is not allowed?

vladdoster commented 4 years ago

No update on this?

Airblader commented 4 years ago

Is there a specific reason why setting a font and size is not allowed?

Because any configuration adds complexity and complexity creates vulnerability. We try to keep i3lock as simple as possible from here on out, and generally that means anything related to visual preferences is not worth the complexity.

elig0n commented 5 months ago

Is there a specific reason why setting a font and size is not allowed?

Because any configuration adds complexity and complexity creates vulnerability. We try to keep i3lock as simple as possible from here on out, and generally that means anything related to visual preferences is not worth the complexity.

you do realize that by adopting such an approach you push that complexity on the shoulders of your users who may be building/programming illiterates or have limited time options and that modern people most often own HiDPI monitors which incline if not require them to fiddle with this right ?

either that or that you specify that your program target audience is only for low-inch 4:3 computers with low resolutions in your README & website...

so I don't see how limiting functionality due to lack of customization prevent vulnerability. A command line argument or an ini-like settings file to read & change an aesthetic attribute should NOT and generally DOES NOT pose a security risk since it is done in top notch web servers and security applications and if it is then I bet you can relayer your application in such a way that will reduce surface of attack to minimum or to even non-existent.

orestisfl commented 5 months ago

you do realize that by adopting such an approach you push that complexity on the shoulders of your users who may be building/programming illiterates

I prompt you to read our license header.

In any case, users have created the equally famous i3lock-color fork which supports font customization and more. Open source works.

or have limited time options

Also applies to us

either that or that you specify that your program target audience is only for low-inch 4:3 computers with low resolutions in your README & website...

I happily use i3lock in a 4k screen.

since it is done in top notch web servers and security applications

"Top notch web servers" have 100x the code lines, complexity and developer time compared to i3lock, I don't think that's a fair comparison.

A command line argument or an ini-like settings file to read & change an aesthetic attribute should NOT and generally DOES NOT pose a security risk

Simple example, a font might fail to load which can lead to errors which can make i3lock fail to start which will leave a user's computer unlocked if i3lock is set to lock after a period of inactivity.