高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】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
|