# G4P text size & style

**URL:** <https://discourse.processing.org/t/g4p-text-size-style/28169>\
**Category:** Libraries\
**Created:** [March 1, 2021, 4:42pm UTC](https://discourse.processing.org/t/g4p-text-size-style/28169 "2021-03-01T16:42:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Konstanitn](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Konstanitn](https://discourse.processing.org/u/Konstanitn)\
**Post date:** [March 1, 2021, 4:42pm UTC](https://discourse.processing.org/t/g4p-text-size-style/28169/1 "2021-03-01T16:42:52Z")

</div>

Hello everyone,  
I was looking for a library with a GUI to create custom GUIs to communicate with arduino and the only one (semi) up to dateI was G4P. So I tried to create some Interfaces and with my limited processing knowledge I miss especially the option to individually change styles of text (mainly text size on buttons or labels).

I am using G4P V4.3.6 with GUI Builder 4.4.1 and the “size” slider in the builder doesn’t change anything in code while “bold”, “italic” options are missing completely.

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 1, 2021, 5:56pm UTC](https://discourse.processing.org/t/g4p-text-size-style/28169/2 "2021-03-01T17:56:32Z")

</div>

The ‘size’ slider in GUI Builder controls the spacing on the “Snap to grid” and has nothing to do with font size.

G4P has three default fonts and sizes for

1. display - buttons, labels etc.
2. input - text fields and areas
3. sliders - used for any type of slider control

These can be changed in GUI Builder - in the CONTROLS pane click on the option SKETCH and you can then change the default values used for text. See below

 ![Screenshot 2021-03-01 at 17.46.57](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/70cd7e33972d392fa20ff684b04edae7c0357703.png)

Also you can use the [setFont()](http://www.lagers.org.uk/g4p/ref/classg4p__controls_1_1_g_text_base.html#abf81c7b91afaec557b35095b740e778d) method to change the font face, style and size for any individual control. This cannot be done in GUI Builder the user should add the necessary code in the `customGUI()` method.

---

<div class="post-metadata">

**Author:** ![Konstanitn](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Konstanitn](https://discourse.processing.org/u/Konstanitn)\
**Post date:** [March 11, 2021, 4:20pm UTC](https://discourse.processing.org/t/g4p-text-size-style/28169/3 "2021-03-11T16:20:26Z")

</div>

thank you for the information
