Sketch plugin that hyphenates text
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
sketch-hyphenator.sketchplugin/Contents
src
.appcast.xml
.gitignore
LICENSE
README.md
package-lock.json
package.json

README.md

Icon

Sketch hyphenation plugin

Sketch plugin for addindg / removing hyphenation in selected text layers. Currently plugin supports only Russian and English texts.

Screencast

It uses Hypher javascript hyphenation engine.

Install instructions

Download the ZIP file and extract contents, then double-click on the sketch-hyphenator.sketchplugin file.

Runner

Or if you using Runner, just go to the install tab and search for Sketch hyphenator

Building from source

If you need to hyphenate texts in languages other than Russian and English you can find additional language patterns in the patterns repository.

Include language patterns you need as a dependencies in the package.json file, spanish for example:

"dependencies": {
    "hyphenation.es": "^0.2.1",
    ...
}

Edit the src/hyphenate.js file and add new language patterns:

...
import es from 'hyphenation.es';// Import spanish hyphenation patterns

var engines = new Array();
engines.push(new hypher(ru));
engines.push(new hypher(en));
engines.push(new hypher(es)); // Use spanish patterns as hyphenation engine
...

Now you can build plugin from source:

# Install the dependencies
npm install

# Build an watch for changes
npm run watch

# Watch for sketch plugins logs
skpm log -f

# Always reload scripts before running
defaults write ~/Library/Preferences/com.bohemiancoding.sketch3.plist AlwaysReloadScript -bool YES