Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Custom Feature: Custom Font Text

bladecbladec Member Posts: 22 ✭✭
edited 1:50AM in FeatureScript

Link to feature

This feature is a fork of the Text feature and allows you to upload custom fonts to use with it.

How To

  1. Visit https://bladecoding.github.io/facetype.js/ to convert a TTF font to a JSON file.
  2. Import the JSON file into your document.
  3. Add a Custom Font Text feature and select the JSON file
  4. Configure the rest of the Custom Font Text feature like you would the Text feature.
image.png image.png

Todo

  • Improve kerning support. Only basic x axis kerning is supported.
  • Add ligature support.
  • Improve language support. Low priority unless there is a demand for it.

If your font doesn't work or doesn't look right

Post the TTF, optionally include a document and I'll take a look. I'll prioritize fixes for fonts that people want to use.

Looking for feedback on these

Construction bounding box

You'll probably notice that for a lot of fonts the characters are much smaller than the construction rectangle. I was thinking of an option called "fit to height" to resize the text so that the largest character was the specified Height option. This would cause the text size to be unstable as the height would change as you add and remove characters.

Characters outside the construction rectangle

The bottom edge of the rectangle is the baseline. Some characters such as "g" will go below it. Would you prefer characters stay within the construction rectangle? A separate horizontal construction line could be added for the baseline.

Comments

Sign In or Register to comment.