Plugins
Typography Text rendering with OpenType.js — kerning, optical alignment, type scales, and text-to-path conversion.
Text rendering with OpenType.js integration. Features metrics-based and optical kerning, modular type scales, glyph classification, and SVG path conversion. 3 bundled variable fonts plus system fallbacks.
npm install @genart-dev/plugin-typography
Type ID Display Name Description typography:textText Styled text with font, kerning, optical alignment, and shadow controls
Property Type Default Description contentstring""Text content to render fontFamilystring"Inter"Font family name fontSizenumber24Font size in pixels fontWeightselect"normal"Weight: normal, bold, 100–900 fontStyleselect"normal"Style: normal, italic colorcolor"#000000"Text fill color textAlignselect"left"Alignment: left, center, right lineHeightnumber1.4Line height multiplier letterSpacingnumber0Letter spacing in pixels kerningModeselect"metrics"Kerning: none, metrics, optical opticalAlignmentbooleanfalseEnable optical overshoot compensation maxWidthnumber0Max width for wrapping (0 = no wrap) strokeColorcolor""Text stroke color strokeWidthnumber0Text stroke width shadowEnabledbooleanfalseEnable text shadow shadowColorcolor"#00000040"Shadow color with alpha shadowOffsetXnumber2Shadow horizontal offset shadowOffsetYnumber2Shadow vertical offset shadowBlurnumber4Shadow blur radius
Font Type Weights Notes Inter sans-serif 400, 700 Variable font bundled JetBrains Mono monospace 400 Variable font bundled Source Serif 4 serif 400 Variable font bundled Georgia, Arial, Helvetica, Times New Roman, Courier New system varies System fallbacks
Tool Description set_textSet text content on a typography layer apply_text_styleApply font family, size, weight, color, and alignment list_fontsList available font families set_text_shadowConfigure text shadow properties set_type_scaleGenerate modular type scale (8 named ratios: minor-second through golden) get_font_metricsDetailed metrics: ascender, descender, xHeight, capHeight, kern pairs analyze_text_spacingAnalyze kerning quality with per-pair metrics and divergence warnings convert_text_to_pathsConvert text layer to SVG path data load_custom_fontLoad OTF/TTF/WOFF2 from sketch asset
{
"tool" : "design_add_layer" ,
"arguments" : {
"type" : "typography:text" ,
"properties" : {
"content" : "Hello World" ,
"fontFamily" : "Source Serif 4" ,
"fontSize" : 48 ,
"fontWeight" : "bold" ,
"color" : "#1a1a2e" ,
"kerningMode" : "optical" ,
"opticalAlignment" : true ,
"textAlign" : "center"
}
}
}