Code Monkey home page Code Monkey logo

Comments (8)

thischrisoliver avatar thischrisoliver commented on September 25, 2024 1

I can confirm it's working correctly for me now. Thanks!

from truncat.

KevinGutowski avatar KevinGutowski commented on September 25, 2024

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.

KevinGutowski avatar KevinGutowski commented on September 25, 2024

@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())

Screen Shot 2019-08-09 at 4 46 15 PM

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.

KevinGutowski avatar KevinGutowski commented on September 25, 2024

O! Also, is there any chance you can send me the document with the character spacing issue! That could be very helpful.

from truncat.

KevinGutowski avatar KevinGutowski commented on September 25, 2024

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.

thischrisoliver avatar thischrisoliver commented on September 25, 2024

Here's the Sketch file and the results of running the script:
Truncat Test.sketch.zip

Truncat script

from truncat.

KevinGutowski avatar KevinGutowski commented on September 25, 2024

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.

KevinGutowski avatar KevinGutowski commented on September 25, 2024

Woo! Looks like I'm able to fix the issue!
Aug-13-2019 13-04-08

from truncat.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.