# Want more Unicode sub/superscripts? Need volunteer font designers

**URL:** <https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871>\
**Category:** Offtopic\
**Created:** [October 6, 2020, 4:09pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871 "2020-10-06T16:09:39Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [October 6, 2020, 4:09pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/1 "2020-10-06T16:09:39Z")

</div>

One of the nice little things about Julia programming has been the broad support for Unicode identifiers — variables like `α̂₂′` and operators like `⊕`. However, a common source of frustration is the paucity of available subscripts and superscripts — there is no superscript “q” or subscript “A”, much less superscript “\*” or “†”, in Unicode.

On the back burner for a few years now, a few of us have been bouncing around the idea of proposing that Unicode expand its set of subscripts and superscripts by adding new “mathematical sub/superscript” combining characters. See our draft proposal here, which is now nearing the the point of formal submission: [https://github.com/stevengj/subsuper-proposal](https://github.com/stevengj/subsuper-proposal)

One sticking point is that proposals are required to include _the name and contact information for a company or individual who would agree to provide a computerized font (True Type or PostScript) for publication of the standard_. Can we crowdsource this?

Basically, we need to find volunteers with font-design experience, who, if the proposal is accepted, will create font with the needed characters. In principle, this is as simple as taking a free font like DejaVu Sans Mono, making sub/superscript versions of 100–150 common mathematical glyphs (Latin and Greek characters and a few other symbols), and then adding ligatures so that the new glyphs are used when the corresponding _character+combining-character_ combination is encountered.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [October 6, 2020, 4:11pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/2 "2020-10-06T16:11:37Z")

</div>

I believe @cormullion has mentioned in the past an interest in prototyping this in julia mono’s private use area.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [October 6, 2020, 4:16pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/3 "2020-10-06T16:16:38Z")

</div>

I’ve [already contributed](https://github.com/stevengj/subsuper-proposal/issues/7) to that repository.

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [October 6, 2020, 4:23pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/4 "2020-10-06T16:23:54Z")

</div>

In general for activities like this, i’d recommend to use the UFO format [https://unifiedfontobject.org/](https://unifiedfontobject.org/) and tool chains like [https://github.com/googlefonts/ufo2ft](https://github.com/googlefonts/ufo2ft)

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [June 13, 2021, 10:21pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/5 "2021-06-13T22:21:29Z")

</div>

While there’s a proposal, would it make sense to include overscript and underscript combiners?

 ![](https://global.discourse-cdn.com/julialang/original/3X/7/7/773a0fb2a0a6e9a6d43baa0a1ec21cc61c853bb6.png)

> **[Commas in big numbers everywhere: An OpenType adventure](https://blog.janestreet.com/commas-in-big-numbers-everywhere/)**
>
> My job involves a lot of staring at large numbers, mostly latencies innanoseconds, and picking out magnitudes like microseconds. I noticedmyself constantly c...

> **[Unicode subscripts and superscripts](https://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts#Latin_and_Greek_tables)**
>
> Unicode has subscripted and superscripted versions of a number of characters including a full set of Arabic numerals. These characters allow any polynomial, chemical and certain other equations to be represented in plain text without using any form of markup like HTML or TeX.
> The World Wide Web Consortium and the Unicode Consortium have made recommendations on the choice between using markup and using superscript and subscript characters:
> When used in mathematical context (MathML) it is recomm...

---

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [June 14, 2021, 9:53pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/6 "2021-06-14T21:53:35Z")

</div>

I couldn’t resist trying out the subscripted x’s listed in the Wikipedia page:

```julia
#x₁	x₂	x₃	x₄	x₅	x₆	x₇	x₈	x₉
#xₐ	xₑ	xₒ	xₓ	xₔ	xₕ	xₖ	xₗ	xₘ	xₙ	xₚ	xₛ	xₜ	

x₀ = 7
x₁ = 3
x₂ = 2

xₙ = x₀ + 5x₁ + 3x₂^2

println("xₙ = ",xₙ)

```

---

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [June 14, 2021, 10:45pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/7 "2021-06-14T22:45:04Z")

</div>

Heh, with a little more digging, I see you can type them into the REPL and VS Code as follows:

subscripts:

```julia
julia> x\_1<tab>
julia> x₁ 

```

Similarly, for superscripts, use ^1 – or whatever character or letter you want to super/sub script.

Works with more characters in VS Code than in the REPL.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [June 14, 2021, 11:05pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/8 "2021-06-14T23:05:59Z")

</div>

By the way, all the superscripts and subscripts mentioned in Professor Johnson’s proposal are currently available in the [JuliaMono font](https://juliamono.netlify.app); they live in a Private Use Area, starting at `0xf0000`.

You can display them in string form with:

```julia
for c in 0xf0000:0x20:0xf011f
    print("$(string(c, base=16)) ")
    for c1 in c:c + 0x1f
        print("x$(Char(c1)) ")
    end
    println()
end

```

 ![Screenshot 2021-06-14 at 23.50.40](https://global.discourse-cdn.com/julialang/original/3X/7/c/7cfe1da1e1156b1e287a721af1de944b0cb2a8e7.jpeg)

Of course, this isn’t useful if you want to see your code in its full glory on Github, or indeed anywhere else unless the same font is active. And you can’t use them in Julia variable names, either, because … they’re not valid Unicode glyphs. 🙂

Hence, the proposal…

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [June 14, 2021, 11:16pm UTC](https://discourse.julialang.org/t/want-more-unicode-sub-superscripts-need-volunteer-font-designers/47871/9 "2021-06-14T23:16:27Z")

</div>

chrome://settings/fonts may be useful for customizing browser fonts.
