← Back to Blog

Combining Long Stroke Overlay: The Computer Science of Unicode Strikethrough

Combining Long Stroke Overlay: Unicode Strikethrough Science

When you view a piece of crossed-out text on an Instagram bio or Discord profile—such as s̶t̶r̶i̶k̶e̶—it appears as a unified, seamless typographic element. A horizontal black line passes cleanly through the center of every letter, perfectly mirroring the output of a rich-text word processor.

Yet beneath the graphical surface of your screen, your computer’s operating system is performing a sophisticated rendering operation. Unlike bold or italic font variants—which use independent alphanumeric code points—there is no such thing as an “uppercase A with a built-in strike line” in the Unicode Standard.

How, then, does a web-based strikethrough text generator instruct every smartphone, browser, and terminal to draw a continuous horizontal line across arbitrary words?

The answer lies in the ingenious architecture of Unicode Combining Diacritical Marks, specifically the character known to computer scientists as Combining Long Stroke Overlay (U+0336). In this deep architectural exploration, we will dissect how combining characters operate in digital memory, analyze font shaping engines, and examine how zero-width overlays make cross-platform strikethrough possible.


The Concept of Combining Diacritical Marks

In human writing systems, diacritics are marks placed above, below, or through a base letter to alter its pronunciation, stress, or tone. Common examples include the acute accent in French (é), the umlaut in German (ü), or the tilde in Spanish (ñ).

In early computer systems, every accented letter required its own dedicated ASCII or ISO slot (pre-composed characters). However, as Unicode aimed to digitize every living and historic language on Earth, cataloging every conceivable combination of base letters and accent marks became mathematically unsustainable.

To solve this, Unicode engineers created Combining Diacritical Marks (U+0300 to U+036F).

A combining mark is a zero-width grapheme. It does not advance the cursor horizontally when typed. Instead, it instructs the computer’s text rendering engine (such as HarfBuzz, DirectWrite, or Apple Core Text) to attach the diacritic mark directly onto the preceding base character.

For example:

  • Base character: Latin Small Letter E (U+0065, e)
  • Combining Acute Accent: (U+0301, ´)
  • Combined rendering: e + ´ = é

Anatomy of the Strikethrough Code Point: U+0336

Within the Combining Diacritical Marks block, Unicode encoded a specialized character for editorial cancellation and linguistic phonetic transcription:

  • Unicode Name: COMBINING LONG STROKE OVERLAY
  • Hexadecimal Code Point: U+0336
  • Decimal Value: 822
  • UTF-8 Byte Sequence: 0xCC 0xB6
  • Canonical Combining Class (CCC): 1 (Overlay)

When U+0336 is inserted into a string immediately following any standard character, the font rendering engine draws a horizontal stroke that intersects the middle of that preceding character’s bounding box.

Crucially, because the stroke is designed as a “long” overlay, the left and right ends of the horizontal bar extend slightly beyond the character’s advance width. When multiple base characters each carry a U+0336 overlay in sequence, their individual strike marks overlap horizontally, creating the optical illusion of a single, continuous line drawn through the entire word:

's' + U+0336 ➔ s̶
't' + U+0336 ➔ t̶
'r' + U+0336 ➔ r̶
Result: "s̶t̶r̶"

The String Transformation Algorithm in Code

Understanding how an online strike text generator works under the hood is remarkably simple. The engine takes an input string, breaks it down into individual grapheme clusters, and appends \u0336 after every non-whitespace character.

Here is the core logic written in modern TypeScript:

const COMBINING_LONG_STROKE = '\u0336';

export function createStrikethrough(text: string): string {
  return text
    .split('')
    .map(char => {
      // Do not apply stroke to whitespace or existing control characters
      if (char === ' ' || char === '\n' || char === '\t') {
        return char;
      }
      return char + COMBINING_LONG_STROKE;
    })
    .join('');
}

Visualizing the Memory Footprint

Consider the three-letter word "cat". In standard UTF-8 encoding, "cat" occupies exactly 3 bytes:

  • 'c' = 0x63
  • 'a' = 0x61
  • 't' = 0x74
  • Total: 3 bytes

When converted to strikethrough text ("c̶a̶t̶"), the memory footprint changes dramatically:

  • 'c' (0x63) + U+0336 (0xCC 0xB6) = 3 bytes
  • 'a' (0x61) + U+0336 (0xCC 0xB6) = 3 bytes
  • 't' (0x74) + U+0336 (0xCC 0xB6) = 3 bytes
  • Total: 9 bytes

The visual output appears as three crossed-out letters, but the underlying data string contains six distinct Unicode code points.


Beyond the Long Stroke: The Family of Overlays

While U+0336 is the standard character used for single horizontal strikethroughs, Unicode provides a versatile family of combining overlays that enable diverse visual effects:

Character NameUnicode Code PointOutput ExampleVisual Effect
Long Stroke OverlayU+0336t̶e̶x̶t̶Classic continuous horizontal strike
Short Stroke OverlayU+0335t̵e̵x̵t̵Segmented, staccato strike with gaps
Long Solidus OverlayU+0338t̸e̸x̸t̸Heavy forward-slash strike
Short Solidus OverlayU+0337t̷e̷x̷t̷Subtle diagonal hash strike
Tilde OverlayU+0334t̴e̴x̴t̴Wavy sine-wave overlay through letters
Double StrikethroughU+0336 + U+0336t̶̶e̶̶x̶̶t̶̶Double-thick, intense cancellation line

By chaining these modifiers, our cross out text generator can produce glitchy, corrupted, or multi-line typographic styles that users can copy and paste anywhere.


How Font Engines Render Combining Overlays

Rendering combining characters is one of the most computationally demanding tasks in modern typography. When a browser displays strikethrough Unicode, several subsystems collaborate:

  1. Text Segmentation: The engine scans the text stream and identifies grapheme clusters (a base character plus all attached diacritics).
  2. OpenType Layout (GSUB & GPOS): The font’s Glyph Positioning table (GPOS) calculates exact anchor coordinates for the mark relative to the base glyph. If the base glyph is tall (like an uppercase H), the engine aligns the stroke with the letter’s typographic midline.
  3. Rasterization: The graphic rasterizer renders the vector paths onto the pixel grid, ensuring the overlapping strokes merge without unsightly gaps.

Because high-quality operating systems (Apple iOS/macOS, Google Android, Microsoft Windows) have invested decades into refining OpenType rendering, Unicode strikethrough text displays with near-native fidelity across virtually all modern hardware.


Conclusion

The humble crossed-out word is a triumph of international character standards. Rather than requiring specialized applications or proprietary markup languages, the pairing of standard letters with U+0336 Combining Long Stroke Overlay allows cross-platform, persistent formatting that travels effortlessly across the internet.

Explore our free strikethrough text generator to experiment with combining overlays, slashed fonts, and wavy strikethroughs for your next digital project.