diff options
| author | Robert Pluim | 2021-09-21 17:46:32 +0200 |
|---|---|---|
| committer | Robert Pluim | 2021-09-24 13:10:48 +0200 |
| commit | fdaae2e7bee5512047dc2ae67979d40cf60a5104 (patch) | |
| tree | 10257c603816918103cd9a8c4c1dfd06f711b709 /lisp/language | |
| parent | 04e236044acfb77f2be0b66cd2e0b2a172159546 (diff) | |
| download | emacs-fdaae2e7bee5512047dc2ae67979d40cf60a5104.tar.gz emacs-fdaae2e7bee5512047dc2ae67979d40cf60a5104.zip | |
Move compose-gstring-for-variation-glyph
It logically belongs in composite.el, not japanese.el
* lisp/language/japanese.el (compose-gstring-for-variation-glyph):
Remove from here.
* lisp/composite.el (compose-gstring-for-variation-glyph): And add here.
Diffstat (limited to 'lisp/language')
| -rw-r--r-- | lisp/language/japanese.el | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el index bd8ef6ec857..d9bd42093a0 100644 --- a/lisp/language/japanese.el +++ b/lisp/language/japanese.el | |||
| @@ -264,29 +264,6 @@ eucJP-ms is defined in <http://www.opengroup.or.jp/jvc/cde/appendix.html>." | |||
| 264 | (define-translation-table 'unicode-to-jisx0213 | 264 | (define-translation-table 'unicode-to-jisx0213 |
| 265 | (char-table-extra-slot table 0))) | 265 | (char-table-extra-slot table 0))) |
| 266 | 266 | ||
| 267 | (defun compose-gstring-for-variation-glyph (gstring _direction) | ||
| 268 | "Compose glyph-string GSTRING for graphic display. | ||
| 269 | GSTRING must have two glyphs; the first is a glyph for a han character, | ||
| 270 | and the second is a glyph for a variation selector." | ||
| 271 | (let* ((font (lgstring-font gstring)) | ||
| 272 | (han (lgstring-char gstring 0)) | ||
| 273 | (vs (lgstring-char gstring 1)) | ||
| 274 | (glyphs (font-variation-glyphs font han)) | ||
| 275 | (g0 (lgstring-glyph gstring 0)) | ||
| 276 | (g1 (lgstring-glyph gstring 1))) | ||
| 277 | (catch 'tag | ||
| 278 | (dolist (elt glyphs) | ||
| 279 | (if (= (car elt) vs) | ||
| 280 | (progn | ||
| 281 | (lglyph-set-code g0 (cdr elt)) | ||
| 282 | (lglyph-set-from-to g0 (lglyph-from g0) (lglyph-to g1)) | ||
| 283 | (lgstring-set-glyph gstring 1 nil) | ||
| 284 | (throw 'tag gstring))))))) | ||
| 285 | |||
| 286 | (let ((elt '([".." 1 compose-gstring-for-variation-glyph]))) | ||
| 287 | (set-char-table-range composition-function-table '(#xFE00 . #xFE0F) elt) | ||
| 288 | (set-char-table-range composition-function-table '(#xE0100 . #xE01EF) elt)) | ||
| 289 | |||
| 290 | (provide 'japanese) | 267 | (provide 'japanese) |
| 291 | 268 | ||
| 292 | ;;; japanese.el ends here | 269 | ;;; japanese.el ends here |