0
$\begingroup$

I'm needing to know how to access and change the font for a pre-existing text object. Everything that I have seen uses a new text object. I've tried looking at the bpy.ops.fonts structure, but can't seem to figure it out.

Thanks.

$\endgroup$
1
  • $\begingroup$ Is this a Python question? If so please tag Python on your question and show some Python sample in a screen capture. $\endgroup$ Commented Dec 1, 2018 at 8:25

2 Answers 2

1
$\begingroup$

Example below is based on windows file location.

import bpy

my_name = 'ALGER.TTF'  #name of text object
new_font = 'G:\\Blender Working folders\\Fonts\\ALGER.TTF'  #file location of new font
for ob in bpy.data.objects:
    if ob.name == my_name:
        ob.data.font = bpy.data.fonts.load(new_font)
$\endgroup$
1
  • $\begingroup$ Thanks, this bit of code is enough to allow me to figure out what I need to do. $\endgroup$
    – gwfami
    Commented Dec 1, 2018 at 17:28
0
$\begingroup$

enter image description here

In edit mode before you start typing select from the Font Panel

  • Bold
  • Italic

This determines the font choice

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .