查看单个帖子
旧 2009-05-06, 08:28 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)