几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】export oblique ttf text to dwf (http://www.dimcax.com/hust/showthread.php?t=16223)

yang686526 2009-05-05 10:25 AM

【转帖】export oblique ttf text to dwf
 
export oblique ttf text to dwf
export oblique ttf text to dwf
ttf text height is changed after export to dwf if text's oblique angle != 0. see attached files.
i think it happened because font direction vector length is used for text height calculating (2dexportdevice.cpp):
code:
odfont.m_height = (pstyle->getfont()->getheight() - pstyle->getfont()->getinternalleading())
* ydir.length()
/ pstyle->getfont()->fontabove();
if change ydir.length() to ydir.y texts looks more accurate:
code:
odfont.m_height = (pstyle->getfont()->getheight() - pstyle->getfont()->getinternalleading())
* ydir.y
/ pstyle->getfont()->fontabove();
may be i fail to take something into account?
attached files
you are right. i inserted the fix in our code. thanks.
sergey slezkin


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