diff options
| author | Eli Zaretskii | 2015-06-14 18:02:55 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2015-06-14 18:02:55 +0300 |
| commit | fce59d43e4d6890c1fb694a593dad828e3e3925d (patch) | |
| tree | 3735f05733f86f860e0836f5465505e4ec62c147 | |
| parent | 52da972751d50c2bf27315c7cad96a185b5eb103 (diff) | |
| download | emacs-fce59d43e4d6890c1fb694a593dad828e3e3925d.tar.gz emacs-fce59d43e4d6890c1fb694a593dad828e3e3925d.zip | |
Another improvement for symbol and punctuation characters
* lisp/international/fontset.el (setup-default-fontset): Exclude
from Symbola character ranges for symbols and punctuation covered
well by popular Unicode fonts. Prefer fixed-misc Unicode font, if
installed and where its coverage of symbols and punctuation is
known to be good. (Bug#20727)
| -rw-r--r-- | lisp/international/fontset.el | 68 |
1 files changed, 57 insertions, 11 deletions
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 696940e21c8..acc3732fb2a 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el | |||
| @@ -693,23 +693,44 @@ | |||
| 693 | (cons (car math-subgroup) (nth 1 math-subgroup)) | 693 | (cons (car math-subgroup) (nth 1 math-subgroup)) |
| 694 | (font-spec :registry "iso10646-1" :script (nth 2 math-subgroup)))) | 694 | (font-spec :registry "iso10646-1" :script (nth 2 math-subgroup)))) |
| 695 | 695 | ||
| 696 | ;; Special setup for various symbols and some rarely used characters | 696 | ;; Special setup for various symbols and punctuation characters |
| 697 | ;; covered well by Symbola. | 697 | ;; covered well by Symbola, excluding those covered well by popular |
| 698 | ;; Unicode fonts. We exclude the latter because users don't like us | ||
| 699 | ;; invading on their font setups where they have good support from | ||
| 700 | ;; other fonts. | ||
| 698 | (dolist (symbol-subgroup | 701 | (dolist (symbol-subgroup |
| 699 | '((#x0250 . #x02AF) ;; IPA Extensions | 702 | '((#x2000 . #x2012) ;; General Punctuation |
| 700 | (#x2000 . #x206F) ;; General Punctuation | 703 | (#x2015 . #x2017) |
| 704 | #x201F | ||
| 705 | (#x2023 . #x202F) | ||
| 706 | (#x2031 . #x2038) | ||
| 707 | (#x203B . #x206F) | ||
| 701 | (#x2070 . #x209F) ;; Superscripts and Subscripts | 708 | (#x2070 . #x209F) ;; Superscripts and Subscripts |
| 702 | (#x20A0 . #x20CF) ;; Currency Symbols | 709 | (#x20A0 . #x20AB) ;; Currency Symbols |
| 703 | (#x2100 . #x214F) ;; Letterlike Symbols | 710 | (#x20AD . #x20CF) |
| 704 | (#x2150 . #x218F) ;; Number Forms | 711 | (#x2100 . #x2121) ;; Letterlike Symbols |
| 705 | (#x2190 . #x21FF) ;; Arrows | 712 | (#x2123 . #x214F) |
| 706 | (#x2200 . #x22FF) ;; Mathematical Operators | 713 | (#x2150 . #x215A) ;; Number Forms |
| 707 | (#x2300 . #x23FF) ;; Miscellaneous Technical | 714 | (#x215F . #x218F) |
| 715 | (#x2194 . #x21FF) ;; Arrows | ||
| 716 | (#x2200 . #x2211) ;; Mathematical Operators | ||
| 717 | (#x2213 . #x2247) | ||
| 718 | (#x2249 . #x225F) | ||
| 719 | (#x2261 . #x2263) | ||
| 720 | (#x2266 . #x22FF) | ||
| 721 | (#x2300 . #x2301) ;; Miscellaneous Technical | ||
| 722 | (#x2303 . #x230F) | ||
| 723 | (#x2311 . #x231F) | ||
| 724 | (#x2322 . #x23FF) | ||
| 708 | (#x2400 . #x243F) ;; Control Pictures | 725 | (#x2400 . #x243F) ;; Control Pictures |
| 709 | (#x2440 . #x245F) ;; Optical Char Recognition | 726 | (#x2440 . #x245F) ;; Optical Char Recognition |
| 710 | (#x2460 . #x24FF) ;; Enclosed Alphanumerics | 727 | (#x2460 . #x24FF) ;; Enclosed Alphanumerics |
| 711 | (#x25A0 . #x25FF) ;; Geometric Shapes | 728 | (#x25A0 . #x25FF) ;; Geometric Shapes |
| 712 | (#x2600 . #x26FF) ;; Miscellaneous Symbols | 729 | (#x2600 . #x265F) ;; Miscellaneous Symbols |
| 730 | (#x2661 . #x2662) | ||
| 731 | #x2664 | ||
| 732 | (#x2667 . #x2669) | ||
| 733 | (#x266C . #x26FF) | ||
| 713 | (#x2700 . #x27bF) ;; Dingbats | 734 | (#x2700 . #x27bF) ;; Dingbats |
| 714 | (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A | 735 | (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A |
| 715 | (#x27F0 . #x27FF) ;; Supplemental Arrows-A | 736 | (#x27F0 . #x27FF) ;; Supplemental Arrows-A |
| @@ -738,6 +759,31 @@ | |||
| 738 | (set-fontset-font "fontset-default" '(#x2500 . #x259F) | 759 | (set-fontset-font "fontset-default" '(#x2500 . #x259F) |
| 739 | "FreeMono" nil 'prepend) | 760 | "FreeMono" nil 'prepend) |
| 740 | 761 | ||
| 762 | ;; Since standard-fontset-spec on X uses fixed-medium font, which | ||
| 763 | ;; gets mapped to a iso8859-1 variant, we would like to prefer its | ||
| 764 | ;; iso10646-1 variant for symbols, where the coverage is known to be | ||
| 765 | ;; good. | ||
| 766 | (dolist (symbol-subgroup | ||
| 767 | '((#x2000 . #x206F) ;; General Punctuation | ||
| 768 | (#x2070 . #x209F) ;; Superscripts and Subscripts | ||
| 769 | (#x20A0 . #x20CF) ;; Currency Symbols | ||
| 770 | (#x2150 . #x218F) ;; Number Forms | ||
| 771 | (#x2190 . #x21FF) ;; Arrows | ||
| 772 | (#x2200 . #x22FF) ;; Mathematical Operators | ||
| 773 | (#x2300 . #x23FF) ;; Miscellaneous Technical | ||
| 774 | (#x2400 . #x243F) ;; Control Pictures | ||
| 775 | (#x2440 . #x245F) ;; Optical Char Recognition | ||
| 776 | (#x2460 . #x24FF) ;; Enclosed Alphanumerics | ||
| 777 | (#x2500 . #x257F) ;; Box Drawing | ||
| 778 | (#x2580 . #x259F) ;; Block Elements | ||
| 779 | (#x25A0 . #x25FF) ;; Geometric Shapes | ||
| 780 | (#x2600 . #x2689) ;; Miscellaneous Symbols | ||
| 781 | (#x2700 . #x27bF) ;; Dingbats | ||
| 782 | (#x27F5 . #x27FF))) ;; Supplemental Arrows-A | ||
| 783 | (set-fontset-font "fontset-default" symbol-subgroup | ||
| 784 | "-*-fixed-medium-*-*-*-*-*-*-*-*-*-iso10646-1" | ||
| 785 | nil 'prepend)) | ||
| 786 | |||
| 741 | ;; Append CJK fonts for characters other than han, kana, cjk-misc. | 787 | ;; Append CJK fonts for characters other than han, kana, cjk-misc. |
| 742 | ;; Append fonts for scripts whose name is also a charset name. | 788 | ;; Append fonts for scripts whose name is also a charset name. |
| 743 | (let* ((data (build-default-fontset-data)) | 789 | (let* ((data (build-default-fontset-data)) |