Skip to main content

Configure Fonts

PhotoEditor SDK supports several configuration options for the TextToolController allowing flexible adaptation to different needs and use cases. For a detailed explanation of how to configure different editor views, refer to this guide.


By default, the text alignment is set to In our example, we set the text orientation to NSTextAlignment.left.


By default, the editor allows adding emojis as text input. It is important to note that since emojis are not cross-platform compatible using the serialization feature to share edits across different platforms will result in emojis being rendered with the system's local set of emojis and therefore will appear differently. For this example emoji input is disabled to ensure a consistent cross-platform experience.


The default text size is 20pt, for this example we reduce it to 17pt.


Configuring the TextFontToolController allows passing a closure that is executed every time the user selects a font. This could be used, for instance, to gather analytics on font usage.


Configuring the TextColorToolController allows changing which colors users can use to customize stickers. Here, we assign an array of Color objects containing the UIColors we want to make available.


The editor provides a variety of different colors to customize the background color of the text. In this example, only a small selection of colors is shown by default e.g. based on the favorite colors of the user.