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

[Feature Request] Shrink very wide icons to fit inside 2 wide space #747

Closed
xsrvmy opened this issue Dec 31, 2021 · 4 comments
Closed

[Feature Request] Shrink very wide icons to fit inside 2 wide space #747

xsrvmy opened this issue Dec 31, 2021 · 4 comments

Comments

@xsrvmy
Copy link

xsrvmy commented Dec 31, 2021

Some of the icons used in nerd fonts are very wide. When using narrow fonts such as Iosevka, these exceed the width of two characters. Some programs using nerd font icons (eg. ranger devicon plugin) only put a single space after icons which causes the icon to collide with the text next to it. It would be nice to shrink these icons to fix the 2 wide space, similar to what is being done in the mono variant.

@Finii
Copy link
Collaborator

Finii commented Dec 31, 2021

I believe this is a good idea. ❤️

Do you have a concrete example with icon on Iosevka? I will create a MR this year :-D

@Finii
Copy link
Collaborator

Finii commented Dec 31, 2021

Would resolve #718 (I guess, it is not always obvious what people complain about)

Finii added a commit that referenced this issue Dec 31, 2021
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: #718
Fixes: #747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@xsrvmy
Copy link
Author

xsrvmy commented Dec 31, 2021

image

Note that the desktop icon collides with the D.

Finii added a commit that referenced this issue Dec 31, 2021
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: #718
Fixes: #747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Jul 26, 2022
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: #718
Fixes: #747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Aug 22, 2022
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: #718
Fixes: #747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Sep 7, 2022
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: #718
Fixes: #747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Finii added a commit that referenced this issue Jan 11, 2023
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: #718
Fixes: #747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii closed this as completed in 22684bc Jan 12, 2023
@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a new issue, complete the issue template with all the details necessary to reproduce, and mention this issue as reference.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2023
LNKLEO pushed a commit to LNKLEO/Nerd that referenced this issue Nov 24, 2023
[why]
On very small source fonts the patched-in symbol-glyphs can become very
big and create overlay problems. It might be desirable to scale them
down to 'two advance widths'.

[how]
It could be that the glyphs in question are in a ScaleGlyph range. So we
need to activate that code also for non-single fonts.

Further we allow two slots wide symbols in get_scale_factors() for those
fonts.

Now we take the computed scale factors for non-single fonts - only if we
scale down and not up. It will confuse/upset people if the known symbols
in their fonts suddenly become bigger - and it also does not look right.

Fixes: ryanoasis#718
Fixes: ryanoasis#747

Reported-by: Rui Ming (Max) Xiong <xsrvmy>
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants