Comments (8)
I can confirm it's working correctly for me now. Thanks!
from truncat.
Hi thanks for reaching out about this issue! Unfortunately, I haven't been able to reproduce this issue at all :( which makes me think its either a Sketch bug or more likely a MacOS bug. Does restarting your computer help at all? The fact that Sketch doesn't report any character spacing changes doesn't bode well...
from truncat.
@thischrisoliver If you are able to help debug, could you truncate the text (so that the character spacing is reduced), make sure that the text layer is selected, and then run this script Plugins > Run Script…
let sketch = require('sketch')
let document = sketch.getSelectedDocument()
let selection = document.selectedLayers.layers[0].sketchObject
let paragraphStyle = selection.paragraphStyle()
console.log(paragraphStyle.paragraphSpacing())
console.log(paragraphStyle.allowsDefaultTighteningForTruncation())
console.log(paragraphStyle.tighteningFactorForTruncation())
If the console output is reporting zero still then I'll have resort to some other techniques (which probably include filing a radar with Apple)
from truncat.
O! Also, is there any chance you can send me the document with the character spacing issue! That could be very helpful.
from truncat.
Ahhh I might have found a clue: https://developer.apple.com/documentation/uikit/nsmutableparagraphstyle/1534136-allowsdefaulttighteningfortrunca?language=objc If you could still send me a document with the tightened character spacing I can try and test it with some new code!
from truncat.
Here's the Sketch file and the results of running the script:
Truncat Test.sketch.zip
from truncat.
Sweet!! Thanks a ton! Yeah, looks like allowsDefaultTighteningForTruncation()
is true
for you! I'll push out an update tonight and ensure that setting is off.
from truncat.
Woo! Looks like I'm able to fix the issue!
from truncat.
Related Issues (8)
- Feature request : truncate based on the text box size HOT 1
- Menu States not showing in recent Sketch versions
- Trunctiation works differnetly HOT 3
- After uninstalling plugin default text boxes have tail truncation on them and no way of removing it. HOT 3
- Figma? HOT 1
- Use of the ellipses character instead of 3 dots HOT 1
- Plugin file not present HOT 2
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 truncat.