尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Zalgo / glitch text generator (seeded, above/through/below intensity), a renderability estimate for pasted glitch text, and 17 Unicode style converters. Zero dependencies, TypeScript.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Zalgo (glitch) text that you can control. Combining marks are stacked above the letters, through them, and below them, and each of the three zones has its own intensity. Pass a seed to get the same output every time. The kit also includes a renderability estimate, which warns when text is likely to get cut off or show up as boxes after it is pasted, and 17 Unicode "fancy font" converters (bold, cursive, gothic, bubble, small caps, wide and more). It is pure TypeScript with zero dependencies and no DOM.
Powers https://fontglitch.com
npm install zalgo-kit
import { glitchify, DEFAULT_INTENSITY, ZALGO_HEAVY_INTENSITY } from 'zalgo-kit';
glitchify('hello', DEFAULT_INTENSITY); // random each call
glitchify('hello', { above: 60, mid: 20, below: 60 }, 42); // seeded: same output every time
glitchify('hello', ZALGO_HEAVY_INTENSITY); // the classic heavy look
Each zone takes a value from 0 to 100. At 100, a zone can stack up to 14 marks on each character. mid (strikethrough and overlay marks) is the zone most likely to render as boxes on older systems, which is why it has its own control. Whitespace is never glitched. Seeded output comes from mulberry32, so it is stable across runtimes.
import { glitchify, assessRenderability, countMarks } from 'zalgo-kit';
const text = 'hello';
const out = glitchify(text, { above: 45, mid: 15, below: 45 }, 42);
assessRenderability(out, [...text].length);
// { level: 'caution', marksPerCharacter: 8.4, label: 'May get trimmed', detail: '...' }
countMarks(out); // { above, mid, below, total }
The score is based on the number of marks per visible character: up to 4 is safe, up to 9 is caution, and anything higher is risky. It is an estimate, not a test against each platform. It is grounded in the real reason glitch text breaks: some apps limit fields by bytes rather than characters, and some fonts have no glyph for stacked marks.
import { getStyle, TEXT_STYLES } from 'zalgo-kit';
getStyle('bold').transform('Hello 123'); // '𝐇𝐞𝐥𝐥𝐨 𝟏𝟐𝟑'
getStyle('script').transform('Hello'); // 'ℋℯ𝓁𝓁ℴ'
getStyle('fraktur').transform('Hello'); // 'ℌ𝔢𝔩𝔩𝔬'
getStyle('circled').transform('Hello'); // 'Ⓗⓔⓛⓛⓞ'
getStyle('small-caps').transform('hello'); // 'ʜᴇʟʟᴏ'
for (const s of TEXT_STYLES) console.log(s.id, s.label, s.transform('Glitch'));
The style IDs are bold, italic, bold-italic, script, bold-script, fraktur, double-struck, sans, sans-bold, monospace, circled, squared, small-caps, superscript, fullwidth, strikethrough and underline.
Most styles come from the Mathematical Alphanumeric Symbols block. Unicode leaves gaps in that block, and those gaps are filled from the Letterlike Symbols block, for example the italic h becomes ℎ. A character with no look-alike anywhere in Unicode, such as the superscript q, is passed through unchanged rather than dropped. squared maps lowercase letters to the uppercase glyphs, because Unicode has no squared lowercase letters.
| Export | What it does |
|---|---|
glitchify(text, intensity, seed?) | Adds combining marks to every non-space character |
DEFAULT_INTENSITY, ZALGO_HEAVY_INTENSITY | Presets: {45,15,45} and {65,25,65} |
countMarks(text) | Counts the marks from each zone in a string |
assessRenderability(text, visibleChars) | Returns safe, caution or risky, with label and detail text |
TEXT_STYLES, getStyle(id) | The 17 styles, as { id, label, category, transform } |
MARKS_ABOVE, MARKS_MID, MARKS_BELOW, MAX_MARKS_PER_ZONE | The raw mark pools |
Types: ZalgoIntensity, RenderabilityLevel, RenderabilityResult, TextStyle, TextStyleId.
npm test # 13 engine checks, including an independent check of the mark count against Unicode's \p{Mn} property
MIT