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

Allow variants for capital ẞ as well as lowercase #1552

Closed
3 tasks done
jmcwilliams403 opened this issue Feb 18, 2023 · 2 comments
Closed
3 tasks done

Allow variants for capital ẞ as well as lowercase #1552

jmcwilliams403 opened this issue Feb 18, 2023 · 2 comments

Comments

@jmcwilliams403
Copy link
Contributor

  • The requested variant shape does not go too far away from Iosevka's design.
  • The requested variant does not conflict with any characters in Unicode that Iosevka currently supports.
  • At least two monospace/programming fonts, created by different designers, supported the requested variant. Provide images below.

My favorite implementation of ẞ/ß is probably from DejaVu, but there are not currently any variants available for the capital version like there are for the lowercase version. The current ſs ligature option for the lowercase form is honestly sufficient, but it unfortunately has no effect on the shape of the capital version.

Example in Deja Vu Sans, with my favorite ẞ/ß glyphs of any font:
image
comparison with Iosevka Aile, with a nice lowercase form but unaltered capital form:
image

@jmcwilliams403
Copy link
Contributor Author

For what it's worth, here's how Lucida Grande does it:
ẞß
I like it just as much as DejaVu's glyph, or perhaps more, but Lucida Grande isn't easily obtainable these days.

@jmcwilliams403
Copy link
Contributor Author

I would like to mention that I dug up some old code from Iosevka and updated it with modern variable/function names:

glyph-block Letter-Latin-Upper-Eszet : begin
	glyph-block-import CommonShapes
	glyph-block-import Common-Derivatives

	define ymiddle : [mix 0 CAP 0.5] - HalfStroke
	define ymiddleCap : [mix 0 CAP 0.54] - HalfStroke
	define xFinal : Math.max
		mix (SB + Stroke * HVContrast) RightSB 0.1
		mix SB RightSB 0.3
	define xMiddle : Math.max xFinal (SB + Stroke * HVContrast * 1.2) (RightSB - ymiddle / 2 - Stroke * 0.75)
	define xMiddleBot : Math.max xMiddle (xFinal + 0.01 + TanSlope * Stroke)
	define rightTopX : RightSB + O

	create-glyph 'Eszet.rounded' : glyph-proc
		include : MarkSet.capital

		include : dispiro
			widths.lhs
			g4 (RightSB + O * 2) (CAP - ArchDepthB)
			hookstart (CAP - O)
			flat SB XH
			curl SB 0 [heading Downward]
		include : dispiro
			widths.rhs
			g4   (RightSB - ymiddle / 2 - Stroke * 0.75) (ymiddle + Stroke)
			archv
			g4   (RightSB - O) [mix 0 (ymiddle + Stroke) 0.5]
			arcvh
			flat (RightSB - ymiddle / 2 - HalfStroke) 0
			curl xFinal 0 [heading Leftward]
		include : dispiro
			widths.rhs
			g4 (RightSB + O * 2) (CAP - ArchDepthB)
			g4 (RightSB - ymiddle / 2 - Stroke * 0.75) (ymiddle + Stroke) [widths Stroke 0]

		if SLAB : include : HSerif.lb SB 0 SideJut

	create-glyph 'Eszet.flatTop' : glyph-proc
		include : MarkSet.capital

		include : dispiro
			widths.lhs
			flat rightTopX CAP [heading Leftward]
			curl Middle CAP
			archv
			flat SB XH
			curl SB 0 [heading Downward]
		include : dispiro
			widths.rhs
			g4   xMiddle (ymiddleCap + Stroke) [heading Rightward]
			archv
			g4   (RightSB - O * 2) [YSmoothMidR (ymiddleCap + Stroke) 0]
			arcvh
			flat xMiddleBot 0
			curl xFinal 0 [heading Leftward]
		include : dispiro
			widths.rhs
			g4 rightTopX (CAP - Stroke)
			g4 xMiddle (ymiddleCap + Stroke) [widths Stroke 0]

		if SLAB : include : HSerif.lb SB 0 SideJut

	select-variant 'Eszet' 0x1E9E

Which yields this shape as a variant:
ẞß
image

I'm wondering if this is worth a PR.
I'm also wondering whether the variant selector should be put right before the one for lowercase eszet or at the end of the capital Latin letter section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants