| 1 |
;;; carbon-font.el -- fontsets for Carbon Emacs -*- coding: iso-2022-7bit -*-
|
| 2 |
|
| 3 |
;; Copyright (C) 2004-2008 by T. Hiromatsu <matsuan@users.sourceforge.jp>
|
| 4 |
;; Version 1_5_8
|
| 5 |
;; 2008-02-24
|
| 6 |
|
| 7 |
;;; Commentary:
|
| 8 |
|
| 9 |
;; This package defines fixed-width multilingual fontsets for Carbon Emacs
|
| 10 |
;; on Mac OS X. Comments, questions and feedback will be sent to an english
|
| 11 |
;; list <http://lists.sourceforge.jp/mailman/listinfo/macemacsjp-english>
|
| 12 |
;; of MacEmacs JP project <http://macemacsjp.sourceforge.jp/en/>.
|
| 13 |
;;----------------------------------------------------------------------
|
| 14 |
;; This program is free software; you can redistribute it and/or
|
| 15 |
;; modify it under the terms of the GNU General Public License
|
| 16 |
;; as published by the Free Software Foundation; either version 2
|
| 17 |
;; of the License, or (at your option) any later version.
|
| 18 |
;;
|
| 19 |
;; This program is distributed in the hope that it will be useful,
|
| 20 |
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 21 |
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 22 |
;; GNU General Public License for more details.
|
| 23 |
;;
|
| 24 |
;; The GNU General Public License can be gotten from
|
| 25 |
;; the Free Software Foundation, Inc.,
|
| 26 |
;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
| 27 |
;; http://www.gnu.org/licenses/gpl.html
|
| 28 |
;;
|
| 29 |
;;----------------------------------------------------------------------
|
| 30 |
;; 本プログラムはフリー・ソフトウェアです。
|
| 31 |
;; あなたは、Free Software Foundationが公表したGNU 一般公有使用許諾の
|
| 32 |
;; 「バージョン2」或いはそれ以降の各バージョンの中からいずれかを選択し、
|
| 33 |
;; そのバージョンが定める条項に従って本プログラムを
|
| 34 |
;; 再頒布または変更することができます。
|
| 35 |
;;
|
| 36 |
;; 本プログラムは有用とは思いますが、頒布にあたっては、
|
| 37 |
;; 市場性及び特定目的適合性についての暗黙の保証を含めて、
|
| 38 |
;; いかなる保証も行ないません。
|
| 39 |
;; 詳細についてはGNU 一般公有使用許諾書をお読みください。
|
| 40 |
;;
|
| 41 |
;; GNU一般公有使用許諾は、
|
| 42 |
;; Free Software Foundation,
|
| 43 |
;; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
| 44 |
;; http://www.gnu.org/licenses/gpl.html
|
| 45 |
;; から入手可能です。
|
| 46 |
;;
|
| 47 |
;;----------------------------------------------------------------------
|
| 48 |
;; carbon-font.el 2007-07-22版;;
|
| 49 |
;;
|
| 50 |
;; 1. Introduction
|
| 51 |
;; 1.1. idea
|
| 52 |
;; carbon-font provides font-width-compensation for fixed-width
|
| 53 |
;; fontset for Emacs on Mac OSX. The reasons are:
|
| 54 |
;; Monaco bold has different width from normal font.
|
| 55 |
;; CJK font has different width from ascii font. (We want to use
|
| 56 |
;; 2 times width for CJK).
|
| 57 |
;;
|
| 58 |
;; Defined fontset names are
|
| 59 |
;; osaka = osaka + monaco
|
| 60 |
;; hiramaru = ヒラギノ丸ゴ + monaco
|
| 61 |
;; hirakaku_w3 = ヒラギノ角ゴ w3 + monaco
|
| 62 |
;; hirakaku_w6 = ヒラギノ角ゴ w6 + monaco
|
| 63 |
;; hirakaku_w8 = ヒラギノ角ゴ w8 + monaco
|
| 64 |
;; hiramin_w3 = ヒラギノ明朝 w3 + courier
|
| 65 |
;; hiramin_w6 = ヒラギノ明朝 w6 + courier
|
| 66 |
;;
|
| 67 |
;; Defined sizes are
|
| 68 |
;; point 7,8,9,10,12,14,16,18,20,24
|
| 69 |
;;
|
| 70 |
;; then totally 70 fontsets were defined.
|
| 71 |
;;
|
| 72 |
;; 1.2. Emacs version
|
| 73 |
;; carbon-font supports only CVS version of Emacs after June 1st, 2005.
|
| 74 |
;;
|
| 75 |
;; 2. Usage
|
| 76 |
;; 2.1. Installation
|
| 77 |
;; Please put two files in the folder on load-path.
|
| 78 |
;; carbon-font.el (this file)
|
| 79 |
;; fixed-width-fontset.el
|
| 80 |
;;
|
| 81 |
;; 2.2. load package
|
| 82 |
;; (if (eq window-system 'mac) (require 'carbon-font))
|
| 83 |
;;
|
| 84 |
;; 2.3. set fontset
|
| 85 |
;; Use `fixed-width-set-fontset'.
|
| 86 |
;; Set fontset and size to `default-frame-alist' and `frame-parameter' of
|
| 87 |
;; current frame as `font'. if size is nil, default size of fontset will be used.
|
| 88 |
;; To get available fontset, use `fontset-list'.
|
| 89 |
;;
|
| 90 |
;; example:
|
| 91 |
;; (fixed-width-set-fontset "hiramaru" 14)
|
| 92 |
;;
|
| 93 |
;; 2.4. disable compensation of font width
|
| 94 |
;; (setq fixed-width-rescale nil)
|
| 95 |
;;
|
| 96 |
;; 3. create your own fontset
|
| 97 |
;; If you want to create another fontset, please use new function
|
| 98 |
;; (carbon-font-create-fontset fontset size list)
|
| 99 |
;; fontset : fontset name(striings)
|
| 100 |
;; size : size or list of size that you want to create
|
| 101 |
;; list : alist of encodings and font family name
|
| 102 |
;;
|
| 103 |
;; example : courier and ヒラギノ丸ゴシック(hiragino maru gothic)
|
| 104 |
;;
|
| 105 |
;; (setq carbon-font-encode-family-list-courier
|
| 106 |
;; '((ascii . "courier")
|
| 107 |
;; (japanese-jisx0208 . "hiragino maru gothic pro")
|
| 108 |
;; (katakana-jisx0201 . "hiragino maru gothic pro")
|
| 109 |
;; (thai-tis620 . "ayuthaya")
|
| 110 |
;; (chinese-gb2312 . "stheiti*")
|
| 111 |
;; (chinese-big5-1 . "lihei pro*")
|
| 112 |
;; (korean-ksc5601 . "applegothic*")))
|
| 113 |
;;
|
| 114 |
;; (carbon-font-create-fontset "courier"
|
| 115 |
;; carbon-font-defined-sizes
|
| 116 |
;; carbon-font-encode-family-list-courier)
|
| 117 |
;;
|
| 118 |
;; Then, you can get new fontsets "fontset-courier", that have sizes
|
| 119 |
;; from 7 to 24 point.
|
| 120 |
;;
|
| 121 |
;; 4. Supported encodings on Carbon Emacs
|
| 122 |
;; `mac-charset-info-alist shows
|
| 123 |
;; (("mac-dingbats" 34 nil)
|
| 124 |
;; ("adobe-fontspecific" 33 nil)
|
| 125 |
;; ("mac-symbol" 33 nil)
|
| 126 |
;; ("mac-centraleurroman" 29 mac-centraleurroman)
|
| 127 |
;; ("gb2312.1980-0" 25 chinese-iso-8bit)
|
| 128 |
;; ("mac-cyrillic" 7 mac-cyrillic)
|
| 129 |
;; ("ksc5601.1989-0" 3 korean-iso-8bit)
|
| 130 |
;; ("big5-0" 2 chinese-big5)
|
| 131 |
;; ("jisx0201.1976-0" 1 japanese-shift-jis)
|
| 132 |
;; ("jisx0208.1983-sjis" 1 japanese-shift-jis)
|
| 133 |
;; ("mac-roman" 0 mac-roman))
|
| 134 |
;;
|
| 135 |
;; And also "mac-roman" is described
|
| 136 |
;; ;; Create a fontset that uses mac-roman font. With this fontset,
|
| 137 |
;; ;; characters decoded from mac-roman encoding (ascii, latin-iso8859-1,
|
| 138 |
;; ;; and mule-unicode-xxxx-yyyy) are displayed by a mac-roman font.
|
| 139 |
;;
|
| 140 |
;;----------------------------------------------------------------------
|
| 141 |
;;
|
| 142 |
;; 1. Introduction
|
| 143 |
;; 1.1. このファイルの中身
|
| 144 |
;; このファイルは、carbon emacs on Mac OSX で、2バイト文字と、asciiを
|
| 145 |
;; 1:2の幅で(所謂等幅)で、表示するためのfontset定義の例を示しています。
|
| 146 |
;;
|
| 147 |
;; 定義しているのは、下記の7種の文字セットです。
|
| 148 |
;; osaka = osaka + monaco
|
| 149 |
;; hiramaru = ヒラギノ丸ゴ + monaco
|
| 150 |
;; hirakaku_w3 = ヒラギノ角ゴ w3 + monaco
|
| 151 |
;; hirakaku_w6 = ヒラギノ角ゴ w6 + monaco
|
| 152 |
;; hirakaku_w8 = ヒラギノ角ゴ w8 + monaco
|
| 153 |
;; hiramin_w3 = ヒラギノ明朝 w3 + courier
|
| 154 |
;; hiramin_w6 = ヒラギノ明朝 w6 + courier
|
| 155 |
;;
|
| 156 |
;; point 7,8,9,10,12,14,16,18,20,24 のサイズ
|
| 157 |
;;
|
| 158 |
;; を定義しています。つまり、このファイルでは、70種の、fontset を定義
|
| 159 |
;; していることになります。
|
| 160 |
;; defaultのサイズは、12です。
|
| 161 |
;;
|
| 162 |
;; 1.2. 動作環境
|
| 163 |
;; carbon emacs は、2005-06-01 以降のCVSから入手した物を御使いください。
|
| 164 |
;; それ以前の物は、.emacs読み込みの時にエラーになる可能性があります。
|
| 165 |
;;
|
| 166 |
;; 種々な知恵を授けてくださった、mac-emacsen ML や 2ch mac de emacs会議
|
| 167 |
;; 室の方々に感謝します。
|
| 168 |
;;
|
| 169 |
;; 2. Usage(使い方)
|
| 170 |
;; 2.1. Install
|
| 171 |
;; 下記2つのファイルをロードパスの通ったところに置いて下さい。
|
| 172 |
;; carbon-font.el (this file)
|
| 173 |
;; fixed-width-fontset.el
|
| 174 |
;;
|
| 175 |
;; 2.2. 読み込み
|
| 176 |
;; (if (eq window-system 'mac) (require 'carbon-font))
|
| 177 |
;; としてください。
|
| 178 |
;;
|
| 179 |
;; 2.3. フォントセットを設定
|
| 180 |
;; `fixed-width-set-fontset' を使います。
|
| 181 |
;; Set fontset and size to `default-frame-alist' and `frame-parameter' of
|
| 182 |
;; current frame as `font'. if size is nil, default size of fontset will be used.
|
| 183 |
;; To get available fontset, use `fontset-list'.
|
| 184 |
;;
|
| 185 |
;; 例:
|
| 186 |
;; (fixed-width-set-fontset "hiramaru" 14)
|
| 187 |
;;
|
| 188 |
;; 2.4. 等幅補正を切りたい場合
|
| 189 |
;; (setq fixed-width-rescale nil)
|
| 190 |
;; としてください。
|
| 191 |
;;
|
| 192 |
;; 2.5. fixed-width-fontset.0.9.0 との表示互換性
|
| 193 |
;; (require 'carbon-font) の前に、
|
| 194 |
;; (setq fixed-width-use-QuickDraw-for-ascii t)
|
| 195 |
;; を設定して下さい。
|
| 196 |
;;
|
| 197 |
;; これをやると、monaco も、QuickDraw を使うようになります。その代わり、
|
| 198 |
;; bold が少し潰れてしまいます。行間が詰まり 0.9.0 と同様の表示になり
|
| 199 |
;; ます。
|
| 200 |
;; default は (setq fixed-width-use-QuickDraw-for-ascii nil) で、
|
| 201 |
;; monaco はATSUI を使います。bold は等幅になって、すっきり見えます。
|
| 202 |
;; 又、行間が少し開きます。
|
| 203 |
;;
|
| 204 |
;; 3. 別のフォントセットを作りたい場合別の組合せの fontset を設定したい場
|
| 205 |
;; 合。(新機能)
|
| 206 |
;;
|
| 207 |
;; (carbon-font-create-fontset fontset size list) を使ってください。
|
| 208 |
;; fontset : fontset の名前(striings)
|
| 209 |
;; size : 設定したいサイズ、又はサイズのリスト
|
| 210 |
;; list : エンコーディングとフォントのファミリーネームの連想リスト
|
| 211 |
;;
|
| 212 |
;; 例えば、courier に ヒラギノ丸ゴシックを組み合わせたい場合
|
| 213 |
;;
|
| 214 |
;; (setq carbon-font-encode-family-list-courier
|
| 215 |
;; '((ascii . "courier")
|
| 216 |
;; (japanese-jisx0208 . "hiragino maru gothic pro")
|
| 217 |
;; (katakana-jisx0201 . "hiragino maru gothic pro")
|
| 218 |
;; (thai-tis620 . "ayuthaya")
|
| 219 |
;; (chinese-gb2312 . "stheiti*")
|
| 220 |
;; (chinese-big5-1 . "lihei pro*")
|
| 221 |
;; (korean-ksc5601 . "applegothic*")))
|
| 222 |
;;
|
| 223 |
;; 等と定義しておいて、
|
| 224 |
;;
|
| 225 |
;; (carbon-font-create-fontset "courier"
|
| 226 |
;; carbon-font-defined-sizes
|
| 227 |
;; carbon-font-encode-family-list-courier)
|
| 228 |
;;
|
| 229 |
;; を評価すれば、7〜24 までのサイズの fontset が、fontset-courier という名前で
|
| 230 |
;; 定義されます。
|
| 231 |
;;
|
| 232 |
;; 4. 現在、carbon emacs が、サポートしているエンコーディング
|
| 233 |
;; `mac-charset-info-alist shows
|
| 234 |
;; (("mac-dingbats" 34 nil)
|
| 235 |
;; ("adobe-fontspecific" 33 nil)
|
| 236 |
;; ("mac-symbol" 33 nil)
|
| 237 |
;; ("mac-centraleurroman" 29 mac-centraleurroman)
|
| 238 |
;; ("gb2312.1980-0" 25 chinese-iso-8bit)
|
| 239 |
;; ("mac-cyrillic" 7 mac-cyrillic)
|
| 240 |
;; ("ksc5601.1989-0" 3 korean-iso-8bit)
|
| 241 |
;; ("big5-0" 2 chinese-big5)
|
| 242 |
;; ("jisx0201.1976-0" 1 japanese-shift-jis)
|
| 243 |
;; ("jisx0208.1983-sjis" 1 japanese-shift-jis)
|
| 244 |
;; ("mac-roman" 0 mac-roman))
|
| 245 |
;;
|
| 246 |
;; "mac-roman" は、下記のように3つのエンコーディングを含んでいます。
|
| 247 |
;; ;; Create a fontset that uses mac-roman font. With this fontset,
|
| 248 |
;; ;; characters decoded from mac-roman encoding (ascii, latin-iso8859-1,
|
| 249 |
;; ;; and mule-unicode-xxxx-yyyy) are displayed by a mac-roman font.
|
| 250 |
;;
|
| 251 |
;; T.Hiromatsu
|
| 252 |
;; matsuan@users.sourceforge.jp
|
| 253 |
|
| 254 |
;;
|
| 255 |
;; fontset section
|
| 256 |
;;
|
| 257 |
|
| 258 |
(require 'fixed-width-fontset)
|
| 259 |
|
| 260 |
(defvar fixed-width-encode-reg-alist
|
| 261 |
'((japanese-jisx0208 . "iso10646-*")
|
| 262 |
(katakana-jisx0201 . "iso10646-*")
|
| 263 |
(japanese-jisx0212 . "iso10646-*")
|
| 264 |
(thai-tis620 . "iso10646-*")
|
| 265 |
(chinese-gb2312 . "iso10646-*")
|
| 266 |
(chinese-big5-1 . "iso10646-*")
|
| 267 |
(korean-ksc5601 . "iso10646-*")
|
| 268 |
(latin-iso8859-1 . "mac-roman")
|
| 269 |
(latin-iso8859-2 . "mac-centraleurroman")
|
| 270 |
(cyrillic-iso8859-5 . "mac-cyrillic")))
|
| 271 |
|
| 272 |
(defvar fixed-width-use-QuickDraw-for-ascii nil)
|
| 273 |
|
| 274 |
(defvar fixed-width-xlfd-template
|
| 275 |
(if fixed-width-use-QuickDraw-for-ascii
|
| 276 |
"-apple-%s-medium-r-normal--%d-*-*-*-*-*-mac-roman"
|
| 277 |
"-apple-%s-medium-r-normal--%d-*-*-*-*-*-iso10646-1"))
|
| 278 |
|
| 279 |
(defvar fixed-width-fontset-template "-*-*-medium-r-normal--%d-*-*-*-*-*-fontset-%s")
|
| 280 |
|
| 281 |
(defalias 'fixed-width-create-fontset-func 'create-fontset-from-mac-roman-font)
|
| 282 |
|
| 283 |
(defalias 'carbon-font-create-fontset 'fixed-width-create-fontset)
|
| 284 |
|
| 285 |
;;
|
| 286 |
;; fontset definition section
|
| 287 |
;;
|
| 288 |
|
| 289 |
(defvar carbon-font-defined-sizes '(12 7 8 9 10 14 16 18 20 24))
|
| 290 |
|
| 291 |
;;
|
| 292 |
;; osaka = osaka + monaco
|
| 293 |
;;
|
| 294 |
|
| 295 |
(defvar carbon-font-encode-family-list-osaka
|
| 296 |
'((ascii . "monaco")
|
| 297 |
(japanese-jisx0208 . "osaka")
|
| 298 |
(katakana-jisx0201 . "osaka")
|
| 299 |
(japanese-jisx0212 . "osaka")
|
| 300 |
(chinese-gb2312 . "stheiti*")
|
| 301 |
(chinese-big5-1 . "lihei pro*")
|
| 302 |
(korean-ksc5601 . "applegothic*")))
|
| 303 |
|
| 304 |
(carbon-font-create-fontset "osaka"
|
| 305 |
carbon-font-defined-sizes
|
| 306 |
carbon-font-encode-family-list-osaka)
|
| 307 |
|
| 308 |
;;
|
| 309 |
;; use Quick Draw
|
| 310 |
;;
|
| 311 |
|
| 312 |
(setcdr (assoc 'japanese-jisx0208 fixed-width-encode-reg-alist) "jisx0208.*")
|
| 313 |
(setcdr (assoc 'katakana-jisx0201 fixed-width-encode-reg-alist) "jisx0201.*")
|
| 314 |
|
| 315 |
;;
|
| 316 |
;; hiramaru = ヒラギノ丸ゴ + monaco
|
| 317 |
;;
|
| 318 |
|
| 319 |
(defvar carbon-font-encode-family-list-hiramaru
|
| 320 |
`((ascii . "monaco")
|
| 321 |
(japanese-jisx0208 . "ヒラギノ丸ゴ pro w4")
|
| 322 |
(katakana-jisx0201 . "ヒラギノ丸ゴ pro w4")
|
| 323 |
(japanese-jisx0212 . "hiragino maru gothic pro")
|
| 324 |
(thai-tis620 . "ayuthaya")
|
| 325 |
(chinese-gb2312 . "stheiti*")
|
| 326 |
(chinese-big5-1 . ,(if (x-list-fonts "*apple ligothic*")
|
| 327 |
"apple ligothic*" "lihei pro*"))
|
| 328 |
(korean-ksc5601 . "applegothic*")))
|
| 329 |
|
| 330 |
(carbon-font-create-fontset "hiramaru"
|
| 331 |
carbon-font-defined-sizes
|
| 332 |
carbon-font-encode-family-list-hiramaru)
|
| 333 |
|
| 334 |
;;
|
| 335 |
;; hirakaku_w3 = ヒラギノ角ゴ w3 + monaco
|
| 336 |
;;
|
| 337 |
|
| 338 |
(defvar carbon-font-encode-family-list-hirakaku_w3
|
| 339 |
`((ascii . "monaco")
|
| 340 |
(japanese-jisx0208 . "ヒラギノ角ゴ pro w3")
|
| 341 |
(katakana-jisx0201 . "ヒラギノ角ゴ pro w3")
|
| 342 |
(japanese-jisx0212 . "hiragino kaku gothic pro")
|
| 343 |
(thai-tis620 . "ayuthaya")
|
| 344 |
(chinese-gb2312 . ,(if (x-list-fonts "*-hei-*") "hei*" "stheiti*"))
|
| 345 |
(chinese-big5-1 . "lihei pro*")
|
| 346 |
(korean-ksc5601 . "applegothic*")))
|
| 347 |
|
| 348 |
(carbon-font-create-fontset "hirakaku_w3"
|
| 349 |
carbon-font-defined-sizes
|
| 350 |
carbon-font-encode-family-list-hirakaku_w3)
|
| 351 |
|
| 352 |
;;
|
| 353 |
;; hirakaku_w6 = ヒラギノ角ゴ w6 + monaco
|
| 354 |
;;
|
| 355 |
|
| 356 |
(defvar carbon-font-encode-family-list-hirakaku_w6
|
| 357 |
`((ascii . "monaco")
|
| 358 |
(japanese-jisx0208 . "ヒラギノ角ゴ pro w6")
|
| 359 |
(katakana-jisx0201 . "ヒラギノ角ゴ pro w6")
|
| 360 |
(japanese-jisx0212 . "hiragino kaku gothic pro")
|
| 361 |
(thai-tis620 . "ayuthaya")
|
| 362 |
(chinese-gb2312 . ,(if (x-list-fonts "*-hei-*") "hei*" "stheiti*"))
|
| 363 |
(chinese-big5-1 . "lihei pro*")
|
| 364 |
(korean-ksc5601 . "applegothic*")))
|
| 365 |
|
| 366 |
(carbon-font-create-fontset "hirakaku_w6"
|
| 367 |
carbon-font-defined-sizes
|
| 368 |
carbon-font-encode-family-list-hirakaku_w6)
|
| 369 |
|
| 370 |
;;
|
| 371 |
;; hirakaku_w8 = ヒラギノ角ゴ w8 + monaco
|
| 372 |
;;
|
| 373 |
|
| 374 |
(defvar carbon-font-encode-family-list-hirakaku_w8
|
| 375 |
`((ascii . "monaco")
|
| 376 |
(japanese-jisx0208 . "ヒラギノ角ゴ std w8")
|
| 377 |
(katakana-jisx0201 . "ヒラギノ角ゴ std w8")
|
| 378 |
(japanese-jisx0212 . "hiragino kaku gothic pro")
|
| 379 |
(thai-tis620 . "ayuthaya")
|
| 380 |
(chinese-gb2312 . ,(if (x-list-fonts "*-hei-*") "hei*" "stheiti*"))
|
| 381 |
(chinese-big5-1 . "lihei pro*")
|
| 382 |
(korean-ksc5601 . "applegothic*")))
|
| 383 |
|
| 384 |
(carbon-font-create-fontset "hirakaku_w8"
|
| 385 |
carbon-font-defined-sizes
|
| 386 |
carbon-font-encode-family-list-hirakaku_w8)
|
| 387 |
|
| 388 |
;;
|
| 389 |
;; hiramin_w3 = ヒラギノ明朝 w3 + courier
|
| 390 |
;;
|
| 391 |
|
| 392 |
(defvar carbon-font-encode-family-list-hiramin_w3
|
| 393 |
`((ascii . "courier")
|
| 394 |
(japanese-jisx0208 . "ヒラギノ明朝 pro w3")
|
| 395 |
(katakana-jisx0201 . "ヒラギノ明朝 pro w3")
|
| 396 |
(japanese-jisx0212 . "hiragino mincho pro")
|
| 397 |
(chinese-gb2312 . ,(if (x-list-fonts "*stkaiti*") "stkaiti*" "stheiti*"))
|
| 398 |
(chinese-big5-1 . ,(if (x-list-fonts "*lisong pro*") "lisong pro*" "lihei pro*"))
|
| 399 |
(korean-ksc5601 . ,(if (x-list-fonts "*applemyungjo*")
|
| 400 |
"applemyungjo*" "applegothic*"))))
|
| 401 |
|
| 402 |
(carbon-font-create-fontset "hiramin_w3"
|
| 403 |
carbon-font-defined-sizes
|
| 404 |
carbon-font-encode-family-list-hiramin_w3)
|
| 405 |
|
| 406 |
;;
|
| 407 |
;; hiramin_w6 = ヒラギノ明朝 w6 + courier
|
| 408 |
;;
|
| 409 |
|
| 410 |
(defvar carbon-font-encode-family-list-hiramin_w6
|
| 411 |
`((ascii . "courier")
|
| 412 |
(japanese-jisx0208 . "ヒラギノ明朝 pro w6")
|
| 413 |
(katakana-jisx0201 . "ヒラギノ明朝 pro w6")
|
| 414 |
(japanese-jisx0212 . "hiragino mincho pro")
|
| 415 |
(chinese-gb2312 . ,(if (x-list-fonts "*stkaiti*") "stkaiti*" "stheiti*"))
|
| 416 |
(chinese-big5-1 . ,(if (x-list-fonts "*lisong pro*") "lisong pro*" "lihei pro*"))
|
| 417 |
(korean-ksc5601 . ,(if (x-list-fonts "*applemyungjo*")
|
| 418 |
"applemyungjo*" "applegothic*"))))
|
| 419 |
|
| 420 |
(carbon-font-create-fontset "hiramin_w6"
|
| 421 |
carbon-font-defined-sizes
|
| 422 |
carbon-font-encode-family-list-hiramin_w6)
|
| 423 |
|
| 424 |
;;
|
| 425 |
;; 変数 section
|
| 426 |
;;
|
| 427 |
|
| 428 |
;; 使用するフォントセットを変えた後、自動で、ボールドをリスケールさせる。
|
| 429 |
;; ボールドをリスケールする為のファクターの定義
|
| 430 |
|
| 431 |
(defvar fixed-width-scale-alist-hiragino
|
| 432 |
'(("7" . 1.15) ("8" . 1.35) ("9" . 1.35) ("10" . 1.2) ("12" . 1.2)
|
| 433 |
("14" . 1.2) ("16" . 1.25) ("18" . 1.25) ("20" . 1.2) ("24" . 1.2)))
|
| 434 |
|
| 435 |
(defvar fixed-width-scale-alist-two-byte-bold
|
| 436 |
'(("8" . 1.2) ("9" . 1.25) ("10" . 1.1) ("12" . 1.15)
|
| 437 |
("14" . 1.1) ("16" . 1.2) ("18" . 1.2) ("20" . 1.15) ("24" . 1.15)))
|
| 438 |
|
| 439 |
(defvar fixed-width-scale-alist-osaka-normal
|
| 440 |
'(("7" . 1.15) ("8" . 1.25) ("9" . 1.35) ("10" . 1.2) ("12" . 1.2)
|
| 441 |
("14" . 1.2) ("16" . 1.25) ("18" . 1.25) ("20" . 1.2) ("24" . 1.2)))
|
| 442 |
|
| 443 |
(defvar fixed-width-scale-alist-osaka-bold
|
| 444 |
'(("7" . 1.15) ("8" . 1.25) ("9" . 1.35) ("10" . 1.25) ("12" . 1.2)
|
| 445 |
("14" . 1.2) ("16" . 1.25) ("18" . 1.25) ("20" . 1.2) ("24" . 1.2)))
|
| 446 |
|
| 447 |
(defvar fixed-width-scale-alist-hirakaku-bold
|
| 448 |
'(("7" . 1.1) ("8" . 1.2) ("9" . 1.3) ("10" . 1.1) ("12" . 1.1)
|
| 449 |
("14" . 1.1) ("16" . 1.2) ("18" . 1.2) ("20" . 1.15) ("24" . 1.15)))
|
| 450 |
|
| 451 |
(defvar fixed-width-scale-alist-hirahan-bold
|
| 452 |
'(("7" . 0.8) ("8" . 1.1) ("9" . 1.2) ("10" . 1.0) ("12" . 1.0)
|
| 453 |
("14" . 1.0) ("16" . 1.1) ("18" . 1.1) ("20" . 1.1) ("24" . 1.1)))
|
| 454 |
|
| 455 |
(defvar fixed-width-scale-alist-hiramin
|
| 456 |
'(("7" . 1.15) ("8" . 1.35) ("9" . 1.2) ("10" . 1.2) ("12" . 1.2)
|
| 457 |
("14" . 1.2) ("16" . 1.25) ("18" . 1.25) ("20" . 1.2) ("24" . 1.2)))
|
| 458 |
|
| 459 |
(defvar fixed-width-scale-alist-monaco-bold
|
| 460 |
'(("7" . 0.8) ("8" . 0.95) ("9" . 0.9) ("10" . 0.8) ("12" . 0.9)
|
| 461 |
("14" . 0.9) ("16" . 0.95) ("18" . 0.9) ("20" . 0.95) ("24" . 0.92)))
|
| 462 |
|
| 463 |
(defvar fixed-width-get-scale-alist
|
| 464 |
`((".*monaco-bold-.*-mac-roman" . ,fixed-width-scale-alist-monaco-bold)
|
| 465 |
(".*monaco cy-bold-.*-mac-cyrillic" . ,fixed-width-scale-alist-monaco-bold)
|
| 466 |
(".*courier-bold-.*-mac-roman" . (( "9" . 0.9) ("10" . 0.9)))
|
| 467 |
(".*osaka-medium.*" . ,fixed-width-scale-alist-osaka-normal)
|
| 468 |
(".*osaka-bold.*" . ,fixed-width-scale-alist-osaka-bold)
|
| 469 |
("^-apple-hiragino.*" . ,fixed-width-scale-alist-hiragino)
|
| 470 |
(,(encode-coding-string ".*ヒラギノ丸ゴ pro w4.*" 'emacs-mule) .
|
| 471 |
,fixed-width-scale-alist-hiragino)
|
| 472 |
(,(encode-coding-string ".*ヒラギノ角ゴ pro w3-medium.*" 'emacs-mule) .
|
| 473 |
,fixed-width-scale-alist-osaka-normal)
|
| 474 |
(,(encode-coding-string ".*ヒラギノ角ゴ pro w3-bold.*jisx0208.*" 'emacs-mule) .
|
| 475 |
,fixed-width-scale-alist-hirakaku-bold)
|
| 476 |
(,(encode-coding-string ".*ヒラギノ角ゴ pro w3-bold.*jisx0201.*" 'emacs-mule) .
|
| 477 |
,fixed-width-scale-alist-hirahan-bold)
|
| 478 |
(,(encode-coding-string ".*ヒラギノ角ゴ pro w6.*" 'emacs-mule) .
|
| 479 |
,fixed-width-scale-alist-hiragino)
|
| 480 |
(,(encode-coding-string ".*ヒラギノ角ゴ std w8.*" 'emacs-mule) .
|
| 481 |
,fixed-width-scale-alist-hiragino)
|
| 482 |
(,(encode-coding-string ".*ヒラギノ明朝 pro w3.*" 'emacs-mule) .
|
| 483 |
,fixed-width-scale-alist-hiramin)
|
| 484 |
(,(encode-coding-string ".*ヒラギノ明朝 pro w6.*" 'emacs-mule) .
|
| 485 |
,fixed-width-scale-alist-hiramin)
|
| 486 |
("^-apple-stheiti-.*" . ,fixed-width-scale-alist-hiragino)
|
| 487 |
("^-apple-lihei pro-.*" . ,fixed-width-scale-alist-hiragino)
|
| 488 |
("^-apple-applegothic-.*" . ,fixed-width-scale-alist-hiragino)
|
| 489 |
("^-apple-applemyungjo-.*" . ,fixed-width-scale-alist-hiramin)
|
| 490 |
("^-apple-lisong pro-.*" . ,fixed-width-scale-alist-hiramin)
|
| 491 |
("^-apple-stkaiti-.*" . ,fixed-width-scale-alist-hiramin)
|
| 492 |
("^-apple-hei-.*" . ,fixed-width-scale-alist-hiragino)
|
| 493 |
("^-apple-apple ligothic-.*" . ,fixed-width-scale-alist-hiragino))
|
| 494 |
"ReScale factor alist for each fonts and size.")
|
| 495 |
|
| 496 |
(provide 'carbon-font)
|
| 497 |
|
| 498 |
;;; carbon-font.el ends here
|