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.

New FeatureScript predicate: Fontpicker

jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
I have published Fontpicker R1. You can find it here: https://cad.onshape.com/documents/0fef4e86805ae7e232be4d16/v/1decb6f4e1ef91711d5892a6/e/4522968d16630da6fe5ce8b8

Please note: This document doesn't define a feature itself. Rather, it defines a predicate to be incorporated in to your FeatureScript preconditions. This predicate creates the UI to allow a user to select any Onshape-supported font. 

This document includes an example custom feature that uses the Fontpicker predicate. In this example feature, the user is able to select any supported font and weight. The custom feature retrieves these specifications, constructs a valid font string, and then uses that font string in a skText operation:


If you have questions please post them in the comments.


Comments

  • DavisCCRDavisCCR OS Professional Posts: 7 ✭✭
    Is there a way you could prevent invalid combinations? By choosing BoldItalic and cycling a few fonts you will notice that they all look the same. I assume this is because they default to something.
  • jnewth_onshapejnewth_onshape Member, Onshape Employees Posts: 89
    I think I could make an exclusion set. I have to figure out which are valid but that shouldn't be too hard. 
Sign In or Register to comment.