# Changing the defaults Text attributes

**URL:** <https://root-forum.cern.ch/t/changing-the-defaults-text-attributes/58994>\
**Category:** Newbie\
**Tags:** root\
**Created:** [April 15, 2024, 7:57am UTC](https://root-forum.cern.ch/t/changing-the-defaults-text-attributes/58994 "2024-04-15T07:57:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarsh-2000](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/u/e47774/32.png) [@utkarsh-2000](https://root-forum.cern.ch/u/utkarsh-2000)\
**Post date:** [April 15, 2024, 7:57am UTC](https://root-forum.cern.ch/t/changing-the-defaults-text-attributes/58994/1 "2024-04-15T07:57:45Z")

</div>

Hi, I am trying to add some text to the canvas using the GUI,

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/4/2/429779ca7e0154c6fbfca971fba92fd33e09a6a4.png)

Presently, I have to set the above attributes for each text string. I am wondering if there is a way to put these as the new ‘defaults’ ?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [April 15, 2024, 8:34am UTC](https://root-forum.cern.ch/t/changing-the-defaults-text-attributes/58994/2 "2024-04-15T08:34:07Z")

</div>

Create a file called rootlogon.C in the same folder where you will open ROOT, containing an unnamed function with the settings you want for gStyle, e.g.:

```auto
{
  gStyle->SetTextFont(52);
  gStyle->SetTextSize(0.07);
}

```
