Skip to content

Fix vertical misalignment of :: after angle brackets#1685

Open
crespinl wants to merge 1 commit intotonsky:masterfrom
crespinl:fix-colon-alignment
Open

Fix vertical misalignment of :: after angle brackets#1685
crespinl wants to merge 1 commit intotonsky:masterfrom
crespinl:fix-colon-alignment

Conversation

@crespinl
Copy link
Copy Markdown

First of all, I'm a complete beginner when it comes to fonts, so I hope I did nothing bad.

The issue was caused by a rule that prevented :: and ::: from ligating when adjacent to < or >. Because the colons were kept separate, the second colon was independantly shifted upwards to align with the following uppercase letter, while leaving the first colon on the baseline.

By removing the ignore sub rules for colons next to angle brackets, :: now properly forms a single colon_colon.liga unit.

This fixes #1684, #1329 and #1225

Fixes a bug where `::` would render misaligned in sequences like `toto<int>::Function()`, with the first colon on the baseline and the second shifted up.
@hunterhogan
Copy link
Copy Markdown
Contributor

Perhaps fixes #1346.

Potentially affects #1061 and/or #980.

Current-ish glyphs

These are the same glyphs as 6.902HH but scaled down to 1000 units per em (because I'm in over my head). Regular weight. 36 pt.

6 902HH

PR 1685 glyphs

These are the glyphs from the PR, also scaled down to 1000.

1685

Images with a difference layer

difference

Text in the images

I copied and pasted text from Issues and one commit to make the following. I saw that you had tagged one of the issues as case-sensitive, so I added the lower-case "function".

::<
ClassName<type>::Function
ClassName<type>::function
aligns : and </> (<:, :<, :>, >:) 
:>: and :<: the
a <:< b means a =:= b means 
As <: is defined, 
::< ::> <:: >::
ecs.fetch::<Point>

thank you

Dude, my escapades into font files have convinced me that I never want to design a font. So, thank you very, very much for gifting us the benefits of your knowledge and hard work.

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

Successfully merging this pull request may close these issues.

Misalignment in ClassName<type>::Function

2 participants