 - ;;[功能]:创建字体样式,如已存在,则置为当前
- ;;[语法]:BO-AddStyle-1 (tsname font fbig fh fw fo)
- ;;[参数]:tsname=文字样式名 font=字体名(可加后缀) fbig=大字体 fh=字高 fw=宽高比 fo=倾斜角度
- ;;[返回]:文字样式名
- ;;[示例]:(BO-AddStyle-1 "BO-黑体" "黑体" 0 1 0)
- ;;[结果]:
- (defun BO-TX-AddStyle (tsname font fbig fh fw fo / ts)
- (if (not (tblsearch "STYLE" tsname))
- (progn
- (setq ts (vla-add BO-TXTS tsname))
- (if (= fbig nil)
- (vla-put-FontFile ts font);设置字体(需保证支持目录下有此字体存在)
- (progn
- (vla-put-FontFile ts font);设置字体(需支持目录下有此字体存在)
- (vla-put-BigFontFile ts fbig);设置大字体
- )
- )
- (vla-put-height ts fh);高度
- (vla-put-width ts fw);宽度因子
- (vla-put-obliqueAngle ts fo);倾斜角度
- )
- )
- (BO-TX-SetActive tsname)
- )
|