.. include:: ../_header.rst Text ---- The `Text type `_ allows to create `Text objects`_ based on HTML fonts. It allows customizing the color of the text, the shadows, the stroke, etc... You can create a `Text object `_ by dropping a `Text built-in block `_ on the scene. .. image:: ../images/scene-editor-text-object-create-block-09252020.webp :alt: Create a default Text object. Also, using the `type replacing dialog `_, you can convert a `Bitmap Text `_ (or any other object) into a `Text object`_. .. image:: ../images/scene-editor-text-object-05242020.webp :alt: Text object. The `Text `_ objects are created in code using the `text factory `_. This is how the `scene compiler `_ generates that code: .. code:: const text_1 = this.add.text(90, 385, "", {}); text_1.text = "New Text object"; text_1.setStyle({ "backgroundColor":"blue", "color":"orange", "fontFamily":"serif", "fontSize":"60px", "fontStyle":"bold italic", "stroke":"orange", "shadow.offsetX":5, "shadow.offsetY":5, "shadow.color":"brown", "shadow.blur":7, "shadow.stroke":true, "shadow.fill":true}); text_1.setPadding({"left":10,"top":10,"right":10,"bottom":10}); Text type properties ~~~~~~~~~~~~~~~~~~~~ The `Text type`_ contains many of the `common object properties `_: * `Variable properties `_ * `Lists properties `_ * `Transform properties `_ * `Origin properties `_ * `Flip properties `_ * `Visible property `_ * `Alpha properties `_ It also contains the `Text property `_, that is dedicated to all the objects with texts, and its specific properties: * The `TextStyle `_ properties. * The `TextShadow `_ properties. * The `TextPadding `_ properties. * The `TextWordWrap `_ properties. In the |InspectorView|_, hover the mouse in the label of each property to get a tooltip with the |PhaserAPI|_.