# ToggleButton Font and Text Size

**URL:** <https://forum.juce.com/t/togglebutton-font-and-text-size/10572>\
**Category:** General JUCE discussion\
**Created:** [June 9, 2013, 4:08pm UTC](https://forum.juce.com/t/togglebutton-font-and-text-size/10572 "2013-06-09T16:08:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmanpearl](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dmanpearl/32/270_2.png) [@dmanpearl](https://forum.juce.com/u/dmanpearl)\
**Post date:** [June 9, 2013, 4:08pm UTC](https://forum.juce.com/t/togglebutton-font-and-text-size/10572/1 "2013-06-09T16:08:05Z")

</div>

In the Introjucer Component Builder or derived class code, how can I set the font and font size of “ToggleButton” text?

The “Label” class has font and size fields that can be modified in the Component Builder or in the code. How to do the same for “ToggleButton”?

Similarly, how to keep text from auto-sizing?

---

<div class="post-metadata">

**Author:** ![P4tr3ck](https://avatars.discourse-cdn.com/v4/letter/p/e79b87/32.png) [@P4tr3ck](https://forum.juce.com/u/P4tr3ck)\
**Post date:** [June 9, 2013, 5:15pm UTC](https://forum.juce.com/t/togglebutton-font-and-text-size/10572/2 "2013-06-09T17:15:04Z")

</div>

The text of a ToggleButton is drawn in LookAndFeel::drawToggleButton using Graphics::drawFittedText. You will need to create your own LookAndFeel class and overwrite the LookAndFeel::drawToggleButton method to make it look different.
