I can type ⅓, ⅔ and ½ but can I type 3/3 and 2/2 using unicode? I know that from a mathematical point of view the fractions 2/2 = 3/3 = 1 but I am typing a list where I want to indicate that you have reached the final step (third step out of three steps) and entering "1", after ⅓ and ⅔, would confuse most readers, including myself if I look at my own list some time after I wrote it.

The "target" environment where I want to write these characters are unicode-aware text editors, some that support "rich formatting" and other typographic features.

(I was very hesitant regarding which forum this question would be on topic in so bear with me if you think I should have posted in somewhere else. The area I use this in is source code, hence UX and graphic design seemed off topic.)

Update: here are some screenshots of how superscript - fraction slash - subscript looks in TextEdit in OS X. Font is Helvetica. In the first image the font size is 12 pt, in the second 48 pt. As you can see the spacing is quite off and the subscript character looks quite odd, especially in the second image where it looks like to different character weights.

12 pt 48 pt

closed as off-topic by Thomas Owens Oct 11 '16 at 18:04

  • This question does not appear to be about software engineering within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Correct. There are no unicode characters representing 2/2 or 3/3 as single characters. But can't you just write 2/2 or 3/3 like this? – JacquesB Oct 9 '16 at 19:14
  • It looks inconsistent and ugly. I think I have read that there are some tricks you can use in unicode to combine different characters (such as a smiley with varying skin colours). I was hoping there was a similar trick that would let me achieve 3/3 in a way that is consistent with ⅔. – d-b Oct 9 '16 at 19:18
  • superscript subscript and small spacing – paparazzo Oct 9 '16 at 19:27
  • 1
    I'm voting to close this question as off-topic because it is not about software engineering within the scope defined in the Help Center. – Thomas Owens Oct 11 '16 at 18:04
  • Sounds like a job for LaTeX. – user22815 Oct 11 '16 at 18:41

The U+2044 FRACTION SLASH character can be used to compose arbitrary fractions. However, support for rendering these fractions as ligatures may vary. Primarily, this depends on ligature support by the font, as each font must declare how glyphs may be combined.

Examples, using / as stand-in for the fraction slash in decomposed forms:

  • 1 / 2 = 1⁄2
  • 3 / 3 = 3⁄3
  • 7 / 13 = 7⁄13

Screenshot of the above example with a suitable font (the Ubuntu font).

Screenshot of the above example with the Ubuntu font shows the ligatures in effect

In practice, it might be better to explicitly use subscript and superscript forms to imitate the visual appearance of these fractions, or to not use fractions at all. After all, Unicode is not a layout engine, but a text encoding standard. In particular, you cannot control the precise appearance of text if you do not control the particular font & rendering engine used to display your text.

Further information:

  • Thank you for your answer. Just tried it TextEdit on OS X but using the regular digit 3 combined with U+2044 didn't have any significant visual difference from 3/3 (using Helvetica as well as Code 2000/2001). Do I need to let the editor "know" that these characters should be combined to get the effect you got? Or is it a limitation in the editor and/or font? – d-b Oct 9 '16 at 20:52
  • 2
    +1- Unicode is not a layout engine and is really the wrong tool here. The numbers are rendered as tiny for me anyway and I'd much rather see a normal 1/3 than the Unicode fraction. – DeadMG Oct 9 '16 at 21:32
  • 1
    @d-b As my answer says, this depends on the font. My copy of Helvetica displays 1/2 as ½ but does not combine the other test fractions. An OpenType font has to declare all possible ligatures up front, and many font designers don't do that work. Apparently, Helvetica doesn't have the necessary support for uncommon fractions. Additionally, the text rendering engine has to support ligatures. This should be the case for modern programs, but in a text editor we might want to disable automatic ligatures since we're often interested in specific characters, not just the textual meaning of a string. – amon Oct 9 '16 at 21:35
  • 1
    A fraction is wrong semantically here anyway. "Part one of three" is not "one third". And "Part three of three" is definitely not "three thirds". So just use 3/3 ("three of three"), without any super/subscript or fraction shenannigans. – ths Oct 10 '16 at 0:36

Superscript, fraction slash, and subscript
But not sure how to fix spacing

⁴⁄₄

Not the answer you're looking for? Browse other questions tagged or ask your own question.