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

Specifying fonts in string to curve node #64

Closed
Ranguna opened this issue Jan 8, 2025 · 1 comment
Closed

Specifying fonts in string to curve node #64

Ranguna opened this issue Jan 8, 2025 · 1 comment

Comments

@Ranguna
Copy link

Ranguna commented Jan 8, 2025

When a string to curve node is created, it can accept a font, but it's type if Pointer. Using the "node to script" function from #13, this is the output of a geometry node with a custom font:

string_to_curves(string=('h', 'e', 'l', 'l', 'o'), size=1.0, character_spacing=1.0, word_spacing=1.0, line_spacing=1.0, text_box_width=0.0, font=<bpy_struct, VectorFont("None Away from the Moon Regular") at 0x7be7752b4c08>, pivot_mode="BOTTOM_LEFT", align_y="TOP_BASELINE", overflow="OVERFLOW", align_x="LEFT")

This cannot be used in its current state. I was thinking about using something from bpy.data, but I'm not sure what to use.

@Ranguna
Copy link
Author

Ranguna commented Jan 8, 2025

Welp, this is embarrassing. I managed to find my solution after posting this issue.
If anyone finds this in the future, this works:

string_to_curves(
  string='hello',
  font=bpy.data.fonts["None Away from the Moon Regular"],
)

@Ranguna Ranguna closed this as completed Jan 8, 2025
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

1 participant