-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Store attributes in TextKit 1 text storage #28
Conversation
It is absolutely possible to make a custom interface that does this. These classes are all here just for convenience. But, I'm not opposed to changing them. Editing like this, and the resulting re-laying, will have performance implications. But I doubt anyone that is seriously concerned about that would be using these. Do you know what's up with the tests? |
Fixed the tests and how to run them locally.
I'm using that approach in The Archive and it works really well for huge notes :) Am investigating the fallback font still |
Using these specific Neon classes, I meant! The technique may work just fine! Though out of curiosity, could you define “huge” for me? |
Moby Dick (1.1MB file) |
When I do scrolling performance testing, I typically use a 1 million line document. For large file sizes, 100MB-1GB depending on the way it is generated. But it's great to know it can work in that case! I'm not terribly worried. |
Thank you! |
1GB 🫣 Ok I'll try that, too. |
While I am curious, but I won't worry about it too much. Again, it only matters when using these specific integrations. |
NSLayoutManager
's temp attributes can't be fonts. So no font weight or italic text for anyone. Instead, store the attributes in the text storage directly.Since #26 that doesn't cause any extra work:
This applies to TextKit 1 only.
TextKit 2 still looks like 'before'. (Out of scope with the knowledge I have)
Also the weird 'value' font appears to be a "hole" in the grammar. Nothing's applied there. I'm investigating. Works fine with the JS grammar I'm using because everything's something in JavaScript (: