cell))
(setq data (del-alist 'name data))
)
- (when (setq cell (assq 'name data))
- (setq cell (cdr cell))
- (insert (format
- (if (> (length cell) 47)
- "(name . %S)
+ (when (setq cell (assq 'script data))
+ (insert (format "(script\t\t%s)
"
- "(name\t\t. %S)
- ")
- cell))
- (setq data (del-alist 'name data))
+ (mapconcat (function prin1-to-string)
+ (cdr cell) " ")))
+ (setq data (del-alist 'script data))
)
(when (setq cell (assq 'ucs data))
(setq cell (cdr cell))
(insert (format "\t; %c" char)))
)))))
-(defun insert-char-data-with-variant (char)
+(defun insert-char-data-with-variant (char &optional script)
(insert-char-data char)
(let ((variants (or (char-variants char)
(let ((ucs (get-char-attribute char '->ucs)))
(if ucs
- (delete char (char-variants (int-char ucs))))))))
+ (delete char (char-variants (int-char ucs)))))))
+ variant vs)
(while variants
- (insert-char-data (car variants))
+ (setq variant (car variants))
+ (if (or (null script)
+ (null (setq vs (get-char-attribute variant 'script)))
+ (memq script vs))
+ (insert-char-data variant))
(setq variants (cdr variants))
)))
-(defun insert-char-range-data (min max)
+(defun insert-char-range-data (min max &optional script)
(let ((code min)
char)
(while (<= code max)
(setq char (int-char code))
- (insert-char-data-with-variant char)
+ (insert-char-data-with-variant char script)
(setq code (1+ code))
)))
-(defun write-char-range-data-to-file (min max file)
+(defun write-char-range-data-to-file (min max file &optional script)
(let ((coding-system-for-write 'utf-8))
(with-temp-buffer
- (insert-char-range-data min max)
+ (insert-char-range-data min max script)
(write-region (point-min)(point-max) file))))
(defvar what-character-original-window-configuration)