-
Notifications
You must be signed in to change notification settings - Fork 117
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
unicode exponents for display #297
Conversation
Great find, it looks perfect on my Mac. Unfortunately on Windows, the default console does not seem to display the character. If I launch Julia from the console that Git Bash runs in, the character displays and the fraction is readable, but it doesn't look as nice as one would hope. This is so slick I'm tempted to merge it anyway, but my better judgment says that it is worth thinking about this a bit. I wonder if the best thing to do for now is display the old way on Windows? |
Ah yes I'm sorry I tested only on my mac (and by "tested" I mean just tried it out, as you can see the failed CI tests 😅). I found the character in this SO question, which suggests two other characters. First is Right Raised Omission Bracket |
It's a similar situation for the other suggested character on Windows. Anyone able to chime in regarding appearance on Linux systems? |
What about having an environment variable or some other flag mechanism to toggle either of the display options? My guess is that the actual display of unicode characters is not exactly an OS issue but rather a question of which fonts are installed on that OS, right? Having a toggle/flag for swithcing would be good enough IMHO :) (Even better would be to detect if the characters are displayed somehow) |
I am not sure how much of it is only a font issue. The default Windows console may be part of the problem. An environment variable would work. Kind of wordy, but maybe |
@giordano Could you check the other characters? |
I think it makes sense to default to this on macOS and otherwise have it be opt-in using an environment variable. It's legible on all of the default themes in Terminal (2/10 themes look a little funny but still pretty decent), and seems legible with default iTerm2 settings as well. There's probably a fair bit of variation across other operating systems. |
Suggestion for PainterQubits#18 to use ᐟ for displaying fractional dimensions. I just used SIUnits' `superscript` function for digits 0–9 and minus sign, and a unicode character that looks like a superscript `/` for fractions.
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 81.28% 81.39% +0.11%
==========================================
Files 15 15
Lines 1122 1129 +7
==========================================
+ Hits 912 919 +7
Misses 210 210
Continue to review full report at Codecov.
|
I rebased onto master and did some force pushing, sorry for the noise. The environment variable |
Suggestion for #18 to use
ᐟ
for displaying fractional dimensions.FYI, I used SIUnits'
superscript
combined with unicode characterᐟ
(Canadian Syllabics Final Acute'\u141F'
), which looks like a superscript/
for fractions.It looks like
and I think/hope this is good enough?