几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】odfon (http://www.dimcax.com/hust/showthread.php?t=17650)

yang686526 2009-05-06 08:28 PM

【转帖】odfon
 
odfont
odfont
want to create a new odfont object, i want to get the available characters in a shx font.
code:
odfontptr pfont = odfont::createobject();
pfont->initialize(pstreambuf);
odarray<odchar> shxcharacters;
pfont->getavailablechars(shxcharacters);
but odfont::createobject() crashes. where is my mistake?
thanks for any help
woho
odfont is abstract interface class. so you cann't create this object.
you may use next code. text style must have interested font.
code:
odgitextstyle gitextstyle;
gifromdbtextstyle(textstyleid, gitextstyle);
odfontptr pfont = gitextstyle.getfont();

odarray<odchar> shxcharacters;
pfont->getavailablechars(shxcharacters);
best regards,
sergey z.


所有的时间均为北京时间。 现在的时间是 12:59 PM.