You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Eirik Bakke (Jira)" <ji...@apache.org> on 2020/04/13 21:30:00 UTC
[jira] [Created] (NETBEANS-4166) Review likely inaccurate int-based
character width calculations in editor UI
Eirik Bakke created NETBEANS-4166:
-------------------------------------
Summary: Review likely inaccurate int-based character width calculations in editor UI
Key: NETBEANS-4166
URL: https://issues.apache.org/jira/browse/NETBEANS-4166
Project: NetBeans
Issue Type: Bug
Components: editor - Painting & Printing
Affects Versions: 11.3
Environment: Windows and MacOS with HiDPI/retina displays, Java 9 and above
Reporter: Eirik Bakke
While fixing NETBEANS-346, I discovered several other editor painting coordinate calculations which are likely inaccurate due to rounding errors. Fixing these will be a bit of work, though, and it may be preferable to wait until specific bugs are identified before doing so, so that the changes can be verified to have had the desired effect.
The following members should likely be changed from an int to a float, and initialized from font metrics to full precision:
* org.netbeans.editor.EditorUI.defaultSpaceWidth
* org.netbeans.modules.editor.lib.drawing.DrawEngine.spaceWidth, defaultSpaceWidth, and possibly fragmentWidth
* org.netbeans.modules.editor.lib.drawing.DrawGraphics.defaultSpaceWidth
These changes will propagate to related APIs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists