title: How to change the font size of the text in textbox in python pptx
body: <p>I want to change the font size of the test in textbox
  I tried like...........</p>
  <pre><code>import os
  
  from pptx import Presentation
  from pptx.util import Inches, Pt
  prs = Presentation()
  blank_slide_layout = prs.slide_layouts[6]
  slide = prs.slides.add_slide(blank_slide_layout)
  shapes = slide.shapes
  left = top = width = height = Inches(1)
  txBox = slide.shapes.add_textbox(left, top, width, height)
  tf = txBox.text_frame
  tf.text = &quot;Hello World&quot;
  
  
  prs.save('test.pptx')
  os.startfile('test.pptx')
  </code></pre>
  <p>It is creating the ppt with Hello world text but I am not able to change the font size.
  Second way I tried is like..</p>
  <pre><code>import os
  
  from pptx import Presentation
  from pptx.util import Inches, Pt
  prs = Presentation()
  blank_slide_layout = prs.slide_layouts[6]
  slide = prs.slides.add_slide(blank_slide_layout)
  shapes = slide.shapes
  left = top = width = height = Inches(1)
  txBox = slide.shapes.add_textbox(left, top, width, height)
  tf = txBox.text_frame
  
  
  p = tf.add_paragraph()
  p.text = &quot;Hello World&quot;
  
  p.font.size = Pt(40)
  prs.save('test.pptx')
  os.startfile('test.pptx')
  </code></pre>
  <p>But in this extra line is created at starting of text box and I don't want that line.</p>
  <p>So is there any solution using first approach to change the font size  or using the second approach not to have extra line?</p>