Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible alternate variant of small letter "l" with stylistic set? #205

Closed
Xenapte opened this issue Mar 31, 2024 · 18 comments
Closed

Possible alternate variant of small letter "l" with stylistic set? #205

Xenapte opened this issue Mar 31, 2024 · 18 comments
Labels
enhancement may be implemented as an enhancement

Comments

@Xenapte
Copy link

Xenapte commented Mar 31, 2024

Hi! I was trying to switching my font from Fira Code to Julia Mono since the latter has italic variants, and I must say it's a really fantastic font.

However, the only thing that bothers me is that I feel the bottom of small letter l is a little too curly and personally, I don't find it harmonizing with the rest. I understand that this was done to make the letter wider and many people prefer this style, but I think it would be better if you could add a variant of l, where the strokes are straight and a horizontal bar is used to stretch the width instead, just like the bottom part of i. This is possible with Fira Code so I enabled it while I was using it.

@cormullion
Copy link
Owner

cormullion commented Mar 31, 2024

Hi! it's easy to add a cv.. for that!

I think the main reason for the current design is just to keep it as different as possible from 1 and I - it's easy to confuse 1,l, and I otherwise since the bases are all the same.

@cormullion cormullion added the enhancement may be implemented as an enhancement label Mar 31, 2024
@Xenapte
Copy link
Author

Xenapte commented Mar 31, 2024

Thanks! I know this is done to keep glyph shapes distinct - I think I've seen this reasoning in other fonts too, but I do like the straight variant (maybe because I'm just too used to seeing it as it is used in many popular monospaced fonts?)

Anyways a style variant would be much appreciated and thanks again for the efforts!

@cormullion
Copy link
Owner

cormullion commented Mar 31, 2024

It could look like this:

Screenshot 2024-03-31 at 16 28 08

If you're able to use an environment that allows you to select cv04 (such as VSCode), you could try it out:

jm-cv04.zip

@Xenapte
Copy link
Author

Xenapte commented Apr 1, 2024

It could look like this:
Screenshot 2024-03-31 at 16 28 08

If you're able to use an environment that allows you to select cv04 (such as VSCode), you could try it out:

jm-cv04.zip

This is absolutely a joy to use, thanks for taking care of my quirks on stylistic choices! Currently the only issue I see is the gap between the lt digraph being kinda too wide, but I get that we can't do kernings on a monospaced font (issue #123), so guess I have to get used to it :)
L3POV4J3X1UXG((PXJ_1M

Btw I don't know if it's time for me to close this issue - maybe you wanna tweak it more before finalizing?

@cormullion
Copy link
Owner

Yes,I can (just) see what you mean - we might be getting close to optical illusion/antialiasing/rendering differences. Perhaps the asymmetry of the two letters (more weight on one side than the other) contributes to the perception of a gap...

After a tiny tweak, here's a comparison with SF Mono and Fira Mono:

Screenshot 2024-04-01 at 16 53 52

I'm not planning on another release just yet, though. Can leave this open until then.

@Xenapte
Copy link
Author

Xenapte commented Apr 2, 2024

Alright, I see it.

@singularitti
Copy link

singularitti commented May 5, 2024

I get that we can't do kernings on a monospaced font

See this comment.

image

@singularitti
Copy link

singularitti commented May 5, 2024

Hi, I tried to turn cv04 on in VSCode but nothing seems to be different in l, am I doing it wrong? Here's my settings:

"editor.fontFamily": "JuliaMono",
"editor.fontLigatures": "'ss05', 'ss07', 'ss09', 'ss12', 'ss14', 'ss15', 'ss16', 'ss17', 'cv02', 'cv03', 'cv04'"

@Xenapte
Copy link
Author

Xenapte commented May 6, 2024

Hi, I tried to turn cv04 on in VSCode but nothing seems to be different in l, am I doing it wrong? Here's my settings:

"editor.fontFamily": "JuliaMono",
"editor.fontLigatures": "'ss05', 'ss07', 'ss09', 'ss12', 'ss14', 'ss15', 'ss16', 'ss17', 'cv02', 'cv03', 'cv04'"

It is a test feature not released yet:

jm-cv04.zip

@singularitti
Copy link

singularitti commented May 6, 2024

OK, thanks. I saw it in the CHANGE of v0.055. Maybe we should remove it and put it in the next release?

@cormullion
Copy link
Owner

It's working for me.

Screenshot 2024-05-06 at 09 23 52

The OS caches fonts very 'assertively', sometimes it's difficult to get it to let go of previous versions. While I don't think you have to reboot to zap the font caches, certainly deleting the fonts before installing a newer version is helpful...

@singularitti
Copy link

singularitti commented May 6, 2024

I don't know then... I tried to zap the old font completely and reinstall via Homebrew, then reboot. But it is still the old style. I tried jm-cv04.zip and it works. Could @Xenapte confirm if this works for you? Thank you!

@Timwi
Copy link

Timwi commented May 6, 2024

Is there a way to force cv04 using pyftsubset? I tried --layout-features+=cv04 and --layout-features=cv04 but neither seemed to replace the l character. I also tried ss10 to get the alternate r but to no avail.

@Xenapte
Copy link
Author

Xenapte commented May 6, 2024

I don't know then... I tried to zap the old font completely and reinstall via Homebrew, then reboot. But it is still the old style. I tried jm-cv04.zip and it works. Could @Xenapte confirm if this works for you? Thank you!

Latest release (0.055) works for me. Maybe it's a homebrew issue and you need to just try downloading from here directly

@Xenapte
Copy link
Author

Xenapte commented May 6, 2024

Is there a way to force cv04 using pyftsubset? I tried --layout-features+=cv04 and --layout-features=cv04 but neither seemed to replace the l character. I also tried ss10 to get the alternate r but to no avail.

pyftsubset doesn't work with stylistic sets. It only supports features covered by running pyftsubset --layout-features=?.

If you want to use python fonttools to freeze stylistic sets, you need to write your own code to do that. Or just use a different tool.

@Timwi
Copy link

Timwi commented May 6, 2024

Thanks! Based on your link, I found the tool pyftfeatfreeze that can do this. It works perfectly for ss01 (alternate g), ss06 (simple a), and cv04 (alternate l). However, it does not appear to do anything for ss10 (alternate r). Could this be a problem with the font file? I notice that the tool doesn’t complain if I specify a completely invalid feature code.

@Xenapte
Copy link
Author

Xenapte commented May 6, 2024

Thanks! Based on your link, I found the tool pyftfeatfreeze that can do this. It works perfectly for ss01 (alternate g), ss06 (simple a), and cv04 (alternate l). However, it does not appear to do anything for ss10 (alternate r). Could this be a problem with the font file? I notice that the tool doesn’t complain if I specify a completely invalid feature code.

Some relevant issues I found there:

I don't really know if this is an issue of the pyftfeatfreeze tool or the font itself based on my limited knowledge.

@cormullion
Copy link
Owner

You could try

https://mutsuntsai.github.io/fontfreeze/

to lock features in.

I found another computer, and installed vs-code, wezterm, kitty, and the latest release of JuliaMono, and everything worked as documented…. 🤔

(wezterm has a configuration quirk - it needs ‘assume_emoji_representation=false’ although I don’t think it should)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement may be implemented as an enhancement
Projects
None yet
Development

No branches or pull requests

4 participants