Unitful.jl
Unitful.jl copied to clipboard
Add ASCII aliases for Unicode dimension characters ๐, ๐, ๐
I've been wrestling with Windows fonts' broken representations of the mathbb dimensions characters while trying to extend Unitful. It'd be nice to have aliases (e.g. const MASS, LENGTH, TIME = ๐, ๐, ๐) for terminal environments where those characters are unrepresentable.
I too really hope we can find a solution to this which works on all operating systems, but ASCII is unnecessarily restrictive. Your proposal also has the disadvantage of exporting very reasonable variable names for other uses.
With Julia incorporating symbols like 'in' = 'โ' in Base, installing a slightly better font could be seen as minimum effort from Windows users anyway. The current symbols are especially problematic, though. A cygwin terminal can show these symbols, but installing that has several disadvantages. Fixed space fonts are also said to be able to show them, but which?
For my use at work, I maintain (as necessary) a clone of Unitful where symbols are
แดธ Length
แดน Mass
แต Time
แดต Current
แถฟ Temperature
แดถ Luminosity
แดบ Amount
For readability, these are always prefixed by space.
Not just for representation, but for simpler entry with a keyboard, how is Dim"Length" etc?