Skip to main content
100%

Change font family for all text layers in Sketch

✓ Published0🌍 Public
Aackuser
Last edited Feb 2, 2016
Created on Feb 23, 2019

This example demonstrates a Sketch plugin that changes the font family of all text layers in a document. It shows how the plugin recursively traverses pages, artboards, groups, and layers to locate every `MSTextLayer` and apply a user-specified font name via `setFontPostscriptName`. The code uses the Sketch plugin API, including `askForUserInput`, `MSArtboardGroup`, `MSLayerGroup`, and layer hierarchy navigation. If a selection exists, it processes only selected layers; otherwise, it iterates through all pages and their artboards, logging traversal details to the console.

AI-generated description

Similar vizzes