查看单个帖子
旧 2009-05-07, 04:47 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】ext Outpu

text output
text output
i'm trying to convert some text into a dwg file.
the information i have is a logfont, a bounding box before transformation, and the transformation.
i can output text be specifying the height to be the height of the bounding box.
i.e.
oddbtextptr ptext = oddbtext::createobject();
ptext->setheight(bbox.height());
this works fine unless the text contains letters that are higher and lower then the letter 'a'.
e.g. "bottom" outputs fine as does "paper" but "diaper" is incorrect.
the symptoms are that "diaper" is approx 1/3 larger than the bounding box.
is setting the height for text this way correct? if so why the problem with "dp"? if not, how should i do it?
i'm using dd 1.12.04
in autocad "text height" is treated as height of "a" symbol not the height of bounding box. coefficient to convert between these two heights depends on font metrics - it is different for different fonts.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)