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

textproc() should be called without leading and trailing spa
textproc() should be called without leading and trailing spaces
when you implement device::textproc() you can achieve very good text approxiomation even if your native text/font rendering is not identical to autocad's. the oda toolkit take care of all the tricky stuff and serves simpler text segements and neccessary metrics to rendered it.
however, when many leading and trailing spaces are present, the start and end of the actual text may be wrong because spaces may be calculated differently.
in my textproc implementation i now remove trailing and leading spaces and calculates the approriate offset to the start of the core text. and it comes out very close to the original. i do however think that this should be done by the oda dd toolkit itself before it calls textproc.
-rune jorgensen
1. spaces in different fonts have different size.
and in ttf fonts characters can have different appearance depending on their neighbours.
2. text can be underlined/overlined.
if device has textproc() implemented than this routine is the proper place to take care about spaces size and appearance (underlined or having some bacground for example).
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)