![]() |
【转帖】remapping truetype fonts to shx stick fonts
remapping truetype fonts to shx stick fonts
remapping truetype fonts to shx stick fonts can anyone tell me how to remap truetype fonts to shx stick fonts during the rendering process? i don't want to modify the dwg. i am doing a conversion of the data to another drawing format and want to reduce the number of vectors produced. last edited by burmaster; 22nd july 2005 at 02:59 pmfff">. quote: originally posted by burmaster can anyone tell me how to remap truetype fonts to shx stick fonts during the rendering process? i don't want to modify the dwg. i am doing a conversion of the data to another drawing format and want to reduce the number of vectors produced. you can modify the text style table after you have opened the database but before you render it. oddbtextstyletableptr pstyles = pdb->gettextstyletableid().safeopenobject(oddb::kforwr ite); // get an iterator for the style table oddbsymboltableiteratorptr pstyleiter = pstyles->newiterator(); for (pstyleiter->start(); ! pstyleiter->done(); pstyleiter->step()) { oddbtextstyletablerecordptr pstyle = pstyleiter->getrecordid().safeopenobject(oddb::kforwrite); if (!pstyle->isshapefile()) { odstring stylename = pstyle->filename(); cout << " changing " << stylename << " to txt.shx" << endl; stylename = "txt.shx"; pstyle->setfilename(stylename); } } quote: originally posted by burmaster can anyone tell me how to remap truetype fonts to shx stick fonts during the rendering process? i don't want to modify the dwg. i am doing a conversion of the data to another drawing format and want to reduce the number of vectors produced. you can rewrite method oddbhostappservices::getpreferablefont() in your application. see dwgdirect reference topic developer's guide\font handling for more details. modifying the text style table does't give you needed result because font may change in mtext contents (switch "\f"). -- best regards, sergey z. quote: originally posted by burmaster can anyone tell me how to remap truetype fonts to shx stick fonts during the rendering process? i don't want to modify the dwg. i am doing a conversion of the data to another drawing format and want to reduce the number of vectors produced. you can rewrite method oddbhostappservices::getpreferablefont() in your application. see dwgdirect reference topic "developer's guide\font handling" for more details. modifying the text style table does't give you needed result because font may change in mtext contents (switch "\f"). -- best regards, sergey z. |
所有的时间均为北京时间。 现在的时间是 09:46 PM. |