Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change font? #3

Open
Welshymni opened this issue Oct 10, 2019 · 2 comments
Open

Change font? #3

Welshymni opened this issue Oct 10, 2019 · 2 comments

Comments

@Welshymni
Copy link

Hi, I'm new to blender so maybe I'm missing something obvious but is there any way to change the font of the stopwatch/timer?

@mikeycal
Copy link
Owner

Until 2.8, we couldn't change the font in the text strip. I will look into a way to add that feature.

@alexbassy
Copy link

Hey there, thank you for this script 🙌

Here's how I changed the font (I believe you have to use Blender >=2.8):

  1. Add this to the "user preferences" block, line 82
 shadow_color = (0,0,0,1)                   # Default: (0,0,0,1)       
+font_path = "/System/Library/Fonts/Supplemental/Comic Sans MS.ttf"
+time_font = bpy.data.fonts.load(font_path)

This loads the font and creates a VectorFont that you can assign to the sequence 👇

  1. Set the font around line ~170
     seq.sequences[main_seq_name].font_size = time_font_size
+    seq.sequences[main_seq_name].font = time_font
     seq.sequences[main_seq_name].color = time_color

Here is the documentation: https://docs.blender.org/api/current/bpy.types.TextSequence.html?highlight=font_size#bpy.types.TextSequence.font

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants