Text Stroke is a view modifier that adds a stroke to text in SwiftUI.
Caution: Only works with a stroke width less than the thickness of the font.
All feedback welcome.
SwiftUI does not have a built-in method of adding an outline to text commonly found in graphic design tools like Figma. After attempting many approaches, I've found this technique produces the most accurate results.
- Shahinoor Shahin, Implement Custom Text Strokes : SwiftUI
- SuCodee, SwiftUI Tutorial: Custom Outline Text