Comments (4)
Seems the issue is when certain Unicode characters take up 2 spaces, http://denisbider.blogspot.com/2015/09/when-monospace-fonts-arent-unicode.html only real fix is to add in variable width support which may or may not add some extra slowdown as line spacing is only calculated once when added or when font changed
from jimud.
Using the canvas measure text function does help fix this to a point, it reduces some of the overhead of using DOM, the issues that remain with variable width are correct hit testing to correctly draw selection rectangles for proper text copy/paste as different format blocks effect the alignment of text as measuring a string as one long block of text is different then measuring it in split up blocks. The only real correct way to handle is parse each line looping each format block and measuring the width to determine if it is in the desired "block" of text this may reduce performance and drive up cpu on text selection
from jimud.
Sample text, should be spaced out nicely
${esc}m[32mQ${esc}m[33mR${esc}m[34mS${esc}m[35m1${esc}m[36m2
QRS12
from jimud.
Seems it was not fixed 100%, while it fixed most of the overlapping issues there are still some width calculation issues for some Unicode groups, #testutf8 command will display some of the broken widths seen by selecting text, i have a more accurate way to determine text size but is is nearly 2 to 3 times slower then v0.6.1 fix taking nearly 1200ms on avg to run the #textspeed while the v0.6.1 is roughly 600ms on avg. I can not think of a good way to get performance and accurate text widths due to limitations in web tech, you either use the slower more accurate system or the faster less accurate system
from jimud.
Related Issues (20)
- Title wrong on window drag/drop
- Drag grip half hidden HOT 1
- Character manager: make the split bar draggable
- Triggers: Add telnet/gmcp/msdp types
- Backup: Set theme on load
- Electron 23 to 26 HOT 6
- Command input: Add option to ignore leading white space HOT 1
- Command input: Switch to token parser
- Code editor: spell checking markers off HOT 1
- Immortal tools: Drop down list wrong on linux
- Snap package: node modules that run native commands HOT 1
- Code editor: Remote browse dialog
- Advanced editor: paste loses leading spaces HOT 3
- Advanced editor: Wrong color when using last selected
- Preferences: expose parseCommands in dialog HOT 1
- Feature: prompt dialog HOT 4
- MDI: Child windows HOT 3
- MDI: Add option to allow resize of all clients or just active client HOT 1
- Code editor: Diff editor word wrap not working
- Telnet: Random data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jimud.