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

Inconsistent character widths in vector font #55

Closed
Haspaker opened this issue Aug 17, 2021 · 8 comments
Closed

Inconsistent character widths in vector font #55

Haspaker opened this issue Aug 17, 2021 · 8 comments

Comments

@Haspaker
Copy link

Haspaker commented Aug 17, 2021

The vector version of the font, CozetteVector, does not appear to be entirely fixed width. Some characters, such as the pause symbol (U+F04C) and the circled plus symbol (U+F055) have a smaller width, leading to misalignment (as clearly seen in the last column of the image below).

Misaligned

I don't know much about fonts or FontForge, but I noticed that all the offending characters declare an unusual Width in the Cozette.sfd file (945 instead of 1024).

StartChar: uniF04C
Encoding: 61516 61516 1123
Width: 945
Flags: W
LayerCount: 2
EndChar

StartChar: uniF055
Encoding: 61525 61525 1571
Width: 945
Flags: W
LayerCount: 2
EndChar

When I change the Width property to 1024 and rebuild, the characters become properly aligned:

Aligned

Is there a good reason these characters declare a different width, or is simply an oversight? If it's an oversight I can submit a pull request to fix it.

@cpkio
Copy link
Contributor

cpkio commented Sep 23, 2021

You didn't mention your OS and used software.

@Haspaker
Copy link
Author

Haspaker commented Sep 23, 2021

@cpkio macOS Catalina. It's system wide (any software), but the screenshots above are from TextEdit.

@cpkio
Copy link
Contributor

cpkio commented Sep 23, 2021

I think this happens in software not enforcing glyph grid (like my terminal emulator in Windows, ConEmu, does, so I dont see any problems). I've done the replacements, they seem to do some width difference in non-terminal software. My PR is still waiting for review, so make your PR after @slavfox will merge.

@cpkio
Copy link
Contributor

cpkio commented Sep 24, 2021

@Haspaker You want all the Width: 945 to be replaced by Width: 1024? I've done it in my fork already, will PR (with my other changes) if this is OK for you.

@Haspaker
Copy link
Author

@cpkio I haven't done any more tests except with the two characters mentioned above, but my guess is that all widths should be set to 1024, since I have no reason to think these 2 characters are special in any way. If you want to PR that's OK with me!

@slavfox
Copy link
Owner

slavfox commented Oct 11, 2021

Could you verify if 1.13.0 fixes the issue?

@cpkio
Copy link
Contributor

cpkio commented Oct 11, 2021

@Haspaker @slavfox I could have forgotten to commit this 🤦‍♂️

@slavfox
Copy link
Owner

slavfox commented Jun 11, 2023

image
I got a chance to debug a lot of CozetteVector issues today, as of 1.19.2-hidpi CozetteVector renders properly, closing.

@slavfox slavfox closed this as completed Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants