Skip to content

softHyphen

The soft hyphen (U+00AD): textSplit ends each syllable of a hyphenated word with it, and textWrap draws it as a hyphen only where a line breaks.

textSplit ends every syllable but the last with the soft hyphen (shown here as ‐). It is invisible in text, so textWrap draws a hyphen only where it breaks a line mid-word and strips the rest.

import {softHyphen, textSplit} from "@d3plus/text";

softHyphen;
textSplit("internationalization");
textSplit("visualization");

Parameters

import {softHyphen} from "@d3plus/text";