One‑Click Sketch Plugin to Match iOS Text Line Height

Discover how a simple Sketch plugin automatically adjusts line height to match iOS defaults, eliminating pixel‑perfect discrepancies and saving designers from tedious manual tweaks.

FangDuoduo UEDC
FangDuoduo UEDC
FangDuoduo UEDC
One‑Click Sketch Plugin to Match iOS Text Line Height

Many designers wonder why the line height in design drafts doesn't match the iOS system rendering. A common rule of thumb is line‑height = font‑size + 4, but this is not always correct.

To investigate, the author measured the default line heights of iOS for font sizes 10 px–28 px and compared them with the default line heights set in Sketch.

iOS line‑height rules discovered:

Font size 10 px → line height = font size + 2

Font size 11 px–20 px → line height = font size + 4

Font size 21 px–28 px → line height = font size + 6

Manually adjusting line height in design files can be tedious. The author introduces a Sketch plugin that automatically sets the line height of selected text layers to match iOS defaults.

After applying the plugin, the line‑height preview matches the iOS rendering (example with 14 px PingFang font). The default Sketch line height differs by a few pixels, which is noticeable to pixel‑perfect designers.

Plugin download: https://github.com/youngxkk/AutoFixiOSTextLineHeight

Usage steps:

Select one or multiple text layers or artboards.

Run Plugins → Auto Fix iOS Text Line Height → Fix or press ⌘ + Option + Shift + I.

The plugin works only for iOS text line height (tested with PingFang). Android has a similar but unstable plugin, which is not covered here.

Images illustrate the comparison before and after applying the plugin.

iOSmobile UISketchline heightdesign plugin
FangDuoduo UEDC
Written by

FangDuoduo UEDC

FangDuoduo UEDC, officially the FangDuoduo User Experience Design Center. It handles UX design for FangDuoduo’s suite of products and focuses on pioneering experience innovation in the online real‑estate sector.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.