马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
说明:虽然这个程序好像很多了,但是手痒算灌水吧。。。呵呵

- [FONT=courier new]
- ;;修改文字样式的字体
- ;;writen by carrot1983 2008-12-27
- (defun C:TT (/ ELIST FONT V2 V3 V4)
- (setvar "cmdecho" 0)
- (command "._undo" "begin")
- (textscr)
- (initget 7)
- (setq FONT "tssdeng.shx,hztxt.shx")
- (princ (strcat "\n*|*|*|*|*| 字体全部替换成"
- FONT
- "但不替换宋体 |*|*|*|*|*"
- )
- )
- (princ "\n*****\n*****")
- (setq ELIST (tblnext "style" t))
- (while ELIST
- (setq V2 (cdr (assoc 2 ELIST)))
- (setq V3 (cdr (assoc 3 ELIST)))
- (setq V4 (cdr (assoc 4 ELIST)))
- (if (/= "SimSun.ttf" V3) ;非宋体,可以根据需求修改
- (progn
- (command ".-style"
- V2
- FONT
- ""
- ""
- ""
- ""
- ""
- ""
- )
- (princ
- (strcat "\n" V2 ": [" V3 " " V4 "] " "-> [" FONT "]")
- )
- )
- (princ (strcat "\n" V2 ": [" V3 "] "))
- )
- (setq ELIST (tblnext "style"))
- )
- (command "._regen")
- (princ "\n*****\n*****")
- (princ
- "\n*|*|*|*|*| 字体替换完毕 |*|*|*|*|* \n carrot1983 2008-12-27"
- )
- (command "._undo" "begin")
- (setvar "cmdecho" 1)
- (princ)
- )
- [/FONT]
|