cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Translate the entire conversation x

how to use specified font when extrude words

WP_14104464
3-Newcomer

how to use specified font when extrude words

I am ready to engrave some words on a surface using extrude function. The code list below, but seems the specified font did not  work. I checked the feature created by this function, the font is still font3D. How can I use other font?

 

double height = 10.0;
pfcPoint2D_ptr firstCorner = wfcCreatePoint2D(-25.00, -25.00);
double length = 48.764;
pfcPoint2D_ptr secondCorner = wfcCreatePoint2D(-25.00 + length, -25.00 + height);
 
wfcSectionEntityText_ptr text = wfcSectionEntityText::Create(firstCorner,secondCorner,content);
 
text->SetFontName("cgomg"); // use font cgomg
wfcSectionEntity_ptr textEntity = wfcSectionEntity::cast(text);
 
sketch->AddEntity(textEntity);
 
sketch->SetIntentManagerMode(true);
sketch->SetIntentManagerMode(false);
 
 
/* Redefining the feature */
extruFeat->RedefineFeature(0, extractedTree, featOpts, regenInstr);
3 REPLIES 3
tbraxton
22-Sapphire II
(To:WP_14104464)

One possibility may be that the font is not stored in the proper location to be called. Creo stores TTF in a directory and not in models. Is the font you are referencing saved in the font directory and loaded?

https://support.ptc.com/help/creo_schematics/r9.0/en/index.html#page/schematics/install_guide/c_sysadmin_7.html 

========================================
Involute Development, LLC
Consulting Engineers
Specialists in Creo Parametric

Hello @WP_14104464

 

It looks like you have a response from our community champion. If it helped you solve your question please mark the reply as the Accepted Solution. 
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.

Thanks,
Vivek N.
Community Moderation Team.

Sorry for a long time delay.
In fact, the problem has been troubling me along.
I checked the support info below:
https://support.ptc.com/help/creo_schematics/r9.0/en/index.html#page/schematics/install_guide/c_sysadmin_7.html 

It seems Creo can use fonts provided by PTC,  and other ttf fonts with settings of pro_font_dir.

I tried several ways to solve the issue.

1, use CG Omega in the table, and switched the name like "cgomg", "CG Omega", or "ccgomg.ttf",  no works.

2, set pro_font_dir as C:\Windows\Fonts\, and then set  windows font name , like "simhei", no works either.

I checked the feature created by this function, the font is still font3D.

No progress yet.

 

Announcements

Top Tags