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

Inconsistencies for unicode frak, bfrak, scr and bscr letters #11

Closed
simeonschaub opened this issue Aug 2, 2020 · 15 comments
Closed

Inconsistencies for unicode frak, bfrak, scr and bscr letters #11

simeonschaub opened this issue Aug 2, 2020 · 15 comments
Labels
bug Something isn't working stale

Comments

@simeonschaub
Copy link
Contributor

A few letters for these unicode groups are inconsistent:
frak: A, N
bfrak: Q
scr: (B), M, N, R
bscr: H, K, M, N, R, T, V, Y

All characters tested:

Screenshot from 2020-08-03 00-14-30

Code

julia> for (name,st) in pairs(Tofrak.styles)
           println(name)
           foreach(print, st.(['A':'Z'; 'a':'z'; '0':'9']))
           println()
       end
bb
𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡
b
𝐀𝐁𝐂𝐃𝐄𝐅𝐆𝐇𝐈𝐉𝐊𝐋𝐌𝐍𝐎𝐏𝐐𝐑𝐒𝐓𝐔𝐕𝐖𝐗𝐘𝐙𝐚𝐛𝐜𝐝𝐞𝐟𝐠𝐡𝐢𝐣𝐤𝐥𝐦𝐧𝐨𝐩𝐪𝐫𝐬𝐭𝐮𝐯𝐰𝐱𝐲𝐳𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗
sans
𝖠𝖡𝖢𝖣𝖤𝖥𝖦𝖧𝖨𝖩𝖪𝖫𝖬𝖭𝖮𝖯𝖰𝖱𝖲𝖳𝖴𝖵𝖶𝖷𝖸𝖹𝖺𝖻𝖼𝖽𝖾𝖿𝗀𝗁𝗂𝗃𝗄𝗅𝗆𝗇𝗈𝗉𝗊𝗋𝗌𝗍𝗎𝗏𝗐𝗑𝗒𝗓𝟢𝟣𝟤𝟥𝟦𝟧𝟨𝟩𝟪𝟫
mono
𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉𝚊𝚋𝚌𝚍𝚎𝚏𝚐𝚑𝚒𝚓𝚔𝚕𝚖𝚗𝚘𝚙𝚚𝚛𝚜𝚝𝚞𝚟𝚠𝚡𝚢𝚣𝟶𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿
bisans
𝘼𝘽𝘾𝘿𝙀𝙁𝙂𝙃𝙄𝙅𝙆𝙇𝙈𝙉𝙊𝙋𝙌𝙍𝙎𝙏𝙐𝙑𝙒𝙓𝙔𝙕𝙖𝙗𝙘𝙙𝙚𝙛𝙜𝙝𝙞𝙟𝙠𝙡𝙢𝙣𝙤𝙥𝙦𝙧𝙨𝙩𝙪𝙫𝙬𝙭𝙮𝙯𝟬𝟭𝟮𝟯𝟰𝟱𝟲𝟳𝟴𝟵
frak
𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷0123456789
it
𝐴𝐵𝐶𝐷𝐸𝐹𝐺𝐻𝐼𝐽𝐾𝐿𝑀𝑁𝑂𝑃𝑄𝑅𝑆𝑇𝑈𝑉𝑊𝑋𝑌𝑍𝑎𝑏𝑐𝑑𝑒𝑓𝑔ℎ𝑖𝑗𝑘𝑙𝑚𝑛𝑜𝑝𝑞𝑟𝑠𝑡𝑢𝑣𝑤𝑥𝑦𝑧0123456789
scr
𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵𝒶𝒷𝒸𝒹ℯ𝒻ℊ𝒽𝒾𝒿𝓀𝓁𝓂𝓃ℴ𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏0123456789
bscr
𝓐𝓑𝓒𝓓𝓔𝓕𝓖𝓗𝓘𝓙𝓚𝓛𝓜𝓝𝓞𝓟𝓠𝓡𝓢𝓣𝓤𝓥𝓦𝓧𝓨𝓩𝓪𝓫𝓬𝓭𝓮𝓯𝓰𝓱𝓲𝓳𝓴𝓵𝓶𝓷𝓸𝓹𝓺𝓻𝓼𝓽𝓾𝓿𝔀𝔁𝔂𝔃𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗
bfrak
𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅𝖆𝖇𝖈𝖉𝖊𝖋𝖌𝖍𝖎𝖏𝖐𝖑𝖒𝖓𝖔𝖕𝖖𝖗𝖘𝖙𝖚𝖛𝖜𝖝𝖞𝖟𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗
bi
𝑨𝑩𝑪𝑫𝑬𝑭𝑮𝑯𝑰𝑱𝑲𝑳𝑴𝑵𝑶𝑷𝑸𝑹𝑺𝑻𝑼𝑽𝑾𝑿𝒀𝒁𝒂𝒃𝒄𝒅𝒆𝒇𝒈𝒉𝒊𝒋𝒌𝒍𝒎𝒏𝒐𝒑𝒒𝒓𝒔𝒕𝒖𝒗𝒘𝒙𝒚𝒛𝟎𝟏𝟐𝟑𝟒𝟓𝟔𝟕𝟖𝟗
bsans
𝗔𝗕𝗖𝗗𝗘𝗙𝗚𝗛𝗜𝗝𝗞𝗟𝗠𝗡𝗢𝗣𝗤𝗥𝗦𝗧𝗨𝗩𝗪𝗫𝗬𝗭𝗮𝗯𝗰𝗱𝗲𝗳𝗴𝗵𝗶𝗷𝗸𝗹𝗺𝗻𝗼𝗽𝗾𝗿𝘀𝘁𝘂𝘃𝘄𝘅𝘆𝘇𝟬𝟭𝟮𝟯𝟰𝟱𝟲𝟳𝟴𝟵
isans
𝘈𝘉𝘊𝘋𝘌𝘍𝘎𝘏𝘐𝘑𝘒𝘓𝘔𝘕𝘖𝘗𝘘𝘙𝘚𝘛𝘜𝘝𝘞𝘟𝘠𝘡𝘢𝘣𝘤𝘥𝘦𝘧𝘨𝘩𝘪𝘫𝘬𝘭𝘮𝘯𝘰𝘱𝘲𝘳𝘴𝘵𝘶𝘷𝘸𝘹𝘺𝘻𝟢𝟣𝟤𝟥𝟦𝟧𝟨𝟩𝟪𝟫

(In case you are wondering, these were generated using the file Tofrak.jl from https://github.com/simeonschaub/FrakturaBot.jl.)

@cormullion
Copy link
Owner

Interesting. I was checking them against the Julia manual - are these wrong - when I type \frakA or \frakN in the REPL?

Screenshot 2020-08-02 at 23 33 05

julia> '𝔄'
'𝔄': Unicode U+1D504 (category Lu: Letter, uppercase)

julia> '𝔑'
'𝔑': Unicode U+1D511 (category Lu: Letter, uppercase)

@simeonschaub
Copy link
Contributor Author

What do you mean by wrong? The unicode tables for these math fonts are sometimes a bit odd in that they have some holes, where characters already had a codepoint in previous versions, so the codepoints aren't always together.

@cormullion cormullion added the bug Something isn't working label Aug 3, 2020
@cormullion
Copy link
Owner

This is a bit of a puzzler. But given that this is a Julia-oriented font, I'm thinking to defer to Julia's way of obtaining these characters, rather than extracting Unicodes directly like you do:

Screenshot 2020-08-09 at 13 18 18

These look more correct?

(Not shown are \\Im and \\Re.)

@simeonschaub
Copy link
Contributor Author

I am pretty sure those should be the same, but perhaps I got something wrong? These look great now! (BTW, how are you getting the script h? Apparently, Julia doesn't have \hscr, only \planck, which I believe is the proper substitution.)

@cormullion
Copy link
Owner

I think that's \scrh. There is a \planck but it looks just like an ordinary 'h' to me (although they're different glyphs). I suppose I could make \planck a bit more italic ...

@simeonschaub
Copy link
Contributor Author

simeonschaub commented Aug 9, 2020

I think that's \scrh

🤦 I confused it with \ith, which Julia indeed doesn't complete. https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols#Latin_letters lists it as lowercase italic h though, so it should probably fit in with the other italic characters.

@cormullion
Copy link
Owner

I shall give the planck constant (and planck constant over two pi, U+210F) some right-shift...

@simeonschaub
Copy link
Contributor Author

\planck still looks a bit out of place with the other \it* characters:
Screenshot from 2020-08-10 22-31-10
Would it be possible to add some serifs as well?

@cormullion
Copy link
Owner

cormullion commented Aug 11, 2020

Good idea. Now we have:

Screenshot 2020-08-11 at 08 08 34

@simeonschaub
Copy link
Contributor Author

simeonschaub commented Aug 31, 2020

It's now almost completely perfect! Only some bscr and scr characters still differ in size a bit (I know, I'm greedy! 😇):
Screenshot from 2020-08-31 22-04-40

I wonder whether the larger ones could be made a bit smaller.

julia> print.(getindex.((REPL.REPLCompletions.latex_symbols,), "\\bscr" .* ('A':'Z'))); 𝓐𝓑𝓒𝓓𝓔𝓕𝓖𝓗𝓘𝓙𝓚𝓛𝓜𝓝𝓞𝓟𝓠𝓡𝓢𝓣𝓤𝓥𝓦𝓧𝓨𝓩 julia> print.(getindex.((REPL.REPLCompletions.latex_symbols,), "\\scr" .* ('A':'Z'))); 𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵

@cormullion
Copy link
Owner

No problem - I'm just glad someone's using it! :) I'll have a look at them soon. (I don't think they look so bad on my machine, but I'll investigate... :)

Screenshot 2020-09-01 at 15 35 03

@cormullion
Copy link
Owner

On my Mac at least, kitty is the odd-one out - it seems to rescale some of the characters, perhaps to keep them inside the bounding box.

scriptchars

The other applications are happy for the glyphs to slightly overlap their boundaries if required to do so.

@simeonschaub
Copy link
Contributor Author

Perhaps this is the issue: kovidgoyal/kitty#2272 (comment)

kitty uses a character grid display for performance reasons and because it fits with what a terminal actually is supposed to be. It's never going to have good support for extremely complex scripts, because they simply cannot be rendered in a character cell manner. That said, I dont know what the issue with this particular script is, I will investigate, when I have some time.

Would it make sense to open an issue there?

@simeonschaub
Copy link
Contributor Author

Maybe someone just has to write a JuliaTerminal as well 😆

@stale
Copy link

stale bot commented Oct 18, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Oct 18, 2020
@stale stale bot closed this as completed Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants