-
Notifications
You must be signed in to change notification settings - Fork 240
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
Console font bug, cursor is off #19
Comments
Hey there! The text editing area was resolved in sampottinger/processing#103 (Processing's custom text area UI was not compatible with Java 11 possibly b/c JEP 263) and should be active in your build. I wasn't able to reproduce but I'll keep digging. Which font and at what size? |
Hey there! Sorry... I was able to reproduce the console issue with Source Code Pro 14px. This is a bit funky because I thought Processing simply used |
I had Source Code Pro 16px on OSX.
Op wo 6 nov. 2019 om 23:48 schreef A Samuel Pottinger <
[email protected]>:
… Hey there! Sorry... I was able to reproduce with Source Code Pro 14px.
This is a bit funky because I thought Processing simply used
DefaultStyledDocument default drawing in EditorConsole unlike
JEditTextArea in which processing uses custom drawing behavior. I'll need
to do some digging...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#19>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFUKWU6E55F2FVW3QSU3L3QSNCR7ANCNFSM4JJRW5LQ>
.
|
Hey there! So... we aren't doing custom rendering for that component... It's just a standard JTextPane (see EditorConsole). I'm slightly worried this might be https://bugs.openjdk.java.net/browse/JDK-8158370 (see also https://bugs.openjdk.java.net/browse/JDK-8156217). :-/ The resolution would be wait for Java to fix upstream or override drawing behavior. I'll be back with more soon. |
Well... I'm not quite sure how this bug is manifesting but I traced it down to https://github.com/processing/processing4/blob/master/app/src/processing/app/ui/EditorConsole.java#L173. It appears that there's a rounding error in the text size calculation (inside Swing) but it only happens for certain gutter sizes. Using the default gutter size or switching Editor.LEFT_GUTTER to basically anything other than 44px seems to fix it. |
Responding to benfry#19, there appears to be an issue with calculating the bounds of text inside JTextPane within EditorConsole for specific font family and size combinations. This may be related to https://bugs.openjdk.java.net/browse/JDK-8158370 or https://bugs.openjdk.java.net/browse/JDK-8156217 but resolves when changing Editor.LEFT_GUTTER from 45 to basically anything else.
@clankill3r - This will be resolved with #20. Thank you for your help! |
Hey @clankill3r - this is previewed in a new build. See https://github.com/sampottinger/processing4 (and https://www.datadrivenempathy.com/processing). |
[Fork] Allow support for static imports through pdex's ImportStatement.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I reported a similar issue a while ago for the text editor but I noticed it happens in the console too.
I'm using the latest version of Samuel's website (which is from some time back, so it might been have fixed).
The text was updated successfully, but these errors were encountered: