These are two functions that I have used in the past to create or modify a text style. Hope they are helpful. The first is to create a text style :
;;;*******************************************************************************************
;;; FUNCTION: ENTMAKE-STYLE
;;; DESCRIPTION: CREATES TEXT STYLE TO ARGS
;;; ARGS: name, font, size, oblique, width
;;; EXAMPLE: (ENTMAKE-STYLE "Test" "romans.shx" 0.109375 (dtr 15) 0.80)
;;; RETURNS: nil
;;;*******************************************************************************************
(defun ENTMAKE-STYLE (name font size obl width /)
(if (not (tblobjname "style" name))
(entmake (list '(0 . "STYLE")
'(100 . "AcDbSymbolTableRecord")
'(100 . "AcDbTextStyleTableRecord")
(cons 2 name)
'(70 . 0)
(cons 40 size)
(cons 41 width)
(cons 50 obl)
'(71 . 0)
(cons 42 0.0)
(cons 3 font)
'(4 . "")
)
)
)
)
the second is to modify:
;;;*******************************************************************************************
;;; FUNCTION: ENTMOD-STYLE
;;; DESCRIPTION: MODIFIES TEXT STYLE TO ARGS
;;; ARGS: name, font, size, oblique, width
;;; EXAMPLE: (ENTMOD-STYLE "Test" "romans.shx" 0.109375 (dtr 22.5) 0.80)
;;; RETURNS: entlist
;;;*******************************************************************************************
(defun ENTMOD-STYLE (name font size obl width /)
(if (tblobjname "style" name)
(progn (setq el (entget (tblobjname "style" name)))
(setq el (subst (cons 40 size) (assoc 40 el) el))
(setq el (subst (cons 41 width) (assoc 41 el) el))
(setq el (subst (cons 50 obl) (assoc 50 el) el))
(setq el (subst (cons 3 font) (assoc 3 el) el))
(entmod el)
)
)
)
Have a great day.
MJG