Open Nesuniken opened 1 year ago
Changing the application's font to one with better italicization support (such as JetBrains mono) does appear to resolve the issue. Should've checked sooner in hindsight, didn't realize that setting affected text you otherwise can't style.
It'd still be nice if the errors for incomplete character support were less bizarre.
This would appear to be more likely related to the underlying graphics libraries, which have had recent updates (in 8.9 or 8.10)
does this still happen?
seems not to happen on macOS - I wonder if it happens on Linux?
minimal example to try without DrRacket
#lang at-exp racket/gui
(define f (new frame% [label "Simple Edit"]
[width 200]
[height 200]))
(define c (new editor-canvas% [parent f]))
(define t (new text%))
(send c set-editor t)
(send f show #t)
(define mb (new menu-bar% [parent f]))
(define m-edit (new menu% [label "Edit"] [parent mb]))
(define m-font (new menu% [label "Font"] [parent mb]))
(append-editor-operation-menu-items m-edit #f)
(append-editor-font-menu-items m-font)
(send t set-max-undo-history 100)
;;rπ£
Minimal example has the same bug, except the missing character glyph no longer spreads automatically.
Test 1: Pasted three π£'s and changed each of their font sizes. Test 2: Italicized the first π£. It glitches out without mangling the other ones Test 3: Resized the 2nd π£ again. It now also shows the missing character glyph, but the 3rd π£ is still unaffected
seems not to happen on macOS - I wonder if it happens on Linux?
Did the "unbound identifier" error message correctly italicize π£, or did DrRacket just avoid spreading the missing character symbol to the rest of the editor?
I couldn't reproduce on macOS by italicising comments Nor could I with the minimal test app.
Oh, I misunderstood what you had trouble reproducing.
It also seems like your test app defaulted to a different font than mine. Perhaps the font Racket defaults to on MacOS has better italics support? If you could switch to Consolas or Courier New (or whatever the default font for DrRacket on Windows is), I can confirm at least all of those fonts fail to italicize π£ correctly for me.
Just realized I could use "Revert all preferences to default" to find that Courier New is the default font for DrRacket on Windows. Again, it seems like MacOS Racket has different defaults. Which font is your DrRacket version using?
Just realized I could use "Revert all preferences to default" to find that Courier New is the default font for DrRacket on Windows. Again, it seems like MacOS Racket has different defaults. Which font is your DrRacket version using?
Menlo
Strange, I tried switching my font to Menlo but it still didn't work. Jetbrains Mono remains the only font I've found that DrRacket reliably italicizes correctly.
I couldn't reproduce on macOS by italicising comments Nor could I with the minimal test app.
Within the minimal test app, is there any difference between italicizing π£ and "slanting" it? I'm not sure whether the font distributions I'm finding are incomplete or if MacOS is using slanting as a fallback for characters that don't support italics
Hi, @Nesuniken
I could not find a difference between italic and slant.
I used the characters you provided.
β, β, β, β, β, β, and β€ ββΎβΆββββ₯β½ββββ·.
I just realized I'm having trouble getting italics and slanting to behave differently with any text. Is there some nuance I'm missing. or is Racket using the same procedure for both styles?
seems not to happen on macOS - I wonder if it happens on Linux?
Can finally confirm the bug doesn't happen on Linux. It's exclusive to Windows for whatever reason.
Tested on Windows 11 with Racket 8.8
Steps to reproduce:
Once this is done, every π£ character within the current window, as well as any π£ characters displayed in new windows, will experience the bug until the application is completely restarted.
To confirm that italics are specifically the cause, you can reproduce the bug with comments if you change their style settings. Conversely, you can eliminate the bug from the REPL if you change it to not italicize errors.
Originally I encountered this problem just with the less conventional double struck letters (i.e everything but β, β, β, β, β, β, and β€), but looking into it further it seems to affect other characters like ββΎβΆββββ₯β½ββββ·. They're all mathematical so far, but that could just be because I haven't tested much else. As for how broken italics breaks every other instance of the character, that's still a complete mystery to me.
For the time being, is there a way to disable italics for status bar error messages like there is for REPL ones?