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

U+2044 FRACTION SLASH #1230

Closed
van-de-bugger opened this issue Oct 8, 2021 · 6 comments
Closed

U+2044 FRACTION SLASH #1230

van-de-bugger opened this issue Oct 8, 2021 · 6 comments

Comments

@van-de-bugger
Copy link

I accidentally found that some (not all) fonts treat U+2044 FRACTION SLASH specially, see the samples below.

The samples render the following text:

123456789012345
123/567 9/x y/5
123456789012345

All the digits are regular digits from range U+0030...U+0039, no superscript or subscript digits are used. The only difference is the slash character: in the text above slash is U+002F SOLIDUS (regular ASCII slash; to avoid problems with font used by the browser) while in the samples below slash is U+2044 FRACTION SLASH.

Cascadia Code:
Cascadia Code

Cascadia Mono:
Cascadia Mono
(It looks identically to Cascadia Code.)

Fira Code:
Fira Code
(Incorrect fractions 9/x and y/5 look bad.)

Fira Mono:
Fira Mono
(It looks like a bug: an extra space after the slash.)

IBM Plex Mono:
IBM Plex Mono

Source Code Pro:
Source Code Pro
(Incorrect fractions 9/x and y/5 look bad.)

Ubuntu Mono:
Ubuntu Mono
(It looks like a bug: too small 3 and 5 in the first fraction.)

Following fonts do not treat fraction slash specially:

Cousine:
Cousine

DejaVu Sans Mono:
DejaVu Sans Mono

Droid Sans Mono:
Droid Sans Mono

Iosevka:
Iosevka

I think it is completely ok to render fraction slash as an ordinary slash, so it is not a real request, the ticket is just for your information.

@be5invis
Copy link
Owner

be5invis commented Oct 8, 2021

It looks like that you turned on frac feature?

@be5invis be5invis added this to the Backlog milestone Oct 8, 2021
@van-de-bugger
Copy link
Author

It looks like that you turned on frac feature?

Sorry, I didn't get it. Do you mean I have requested a new feature to be implemented in Iosevka? Err... I don't think so. I quite happy with the current state (btw, thanks for the great font!). But you may want to implement it.

@be5invis
Copy link
Owner

be5invis commented Oct 10, 2021

Resolve as fixed.
I added support for frac. You need to manually enable this OT feature, but when it is on it will look like this:

image

@AndydeCleyre
Copy link

Thanks @be5invis!

A few questions:

  • Enabling this OT feature is only done outside of building a custom font, right? As in, on Linux, we ought to use fontconfig or an app's own OT config.
  • The Wikipedia description of the feature says "Converts figures separated by slash with diagonal fraction" -- when enabled, will this only apply when using U+2044, or also when using U+002F?
  • Are you open to a new issue for afrc support, for vertically stacked fractions? I do not know what the reasonable limits of support for that one are.

@van-de-bugger
Copy link
Author

van-de-bugger commented Oct 16, 2021

What the difference between SOLIDUS and FRACTION SLASH then? Other fonts mentioned above do not convert 1/3 into a fraction ¹/₃ if numbers are separated by SOLIDUS. Conversion works only for FRACTION SLASH.

SOLIDUS is a path component separator. Many directories in my photo collection will look ugly: photos/²°²¹/₁₀/₀₃ instead of expected photos/2012/10/03. SOLIDUS is also used as delimiter in widely used date formats: yyyy/mm/dd, yyyy/dd/mm, so dates will also be broken.

@be5invis
Copy link
Owner

@van-de-bugger Fractions only enable if you manually turn on frac feature.

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

3 participants