[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
[MD:4178] High-level font APIs are implemented
- X-ml-count: 4178
- Subject: [MD:4178] High-level font APIs are implemented
- From: MIYOSHI Masanori <miyoshi@xxxxxxxxxxxxxxxx>
- Date: Wed, 12 Feb 2003 22:39:26 +0900
- User-agent: Wanderlust/2.11.1 (Wonderwall) EMIKO/1.14.1 (Choanoflagellata) LIMIT/1.14.7 (Fujiidera) APEL/10.4 Emacs/21.1 (i386-msvc-nt5.1.2600) MULE/5.0 (SAKAKI) Meadow/1.99 Alpha4 (KUROGANE)
フォントのハイレベルAPIを力ずくで実装しました。
o strict-spec を利用しています。
o space というキーを新設しました。 strict-spec の場合と同様に、文
字間の横方向のスペースを指定します。
o w32-enum-logfont() の結果の一部をキャッシュ化することで、若干速
くなっています。 w32-enum-logfont-cache-file にファイル名を指定
することで、キャッシュの中身をファイルに保存して、再利用するよ
うになります。フォントの構成が変わった場合には、このファイルを
手動で削除する必要があります。デフォルトではファイルに保存しな
いようになっています。
設定例を以下に示します。
設定例1は、dot.emacs.ja のサンプルと同じです。これでは、"Courier
New" のボールド・イタリック体の幅が狭くなり、逆に "MS ゴシック"
のボールド体の幅が広くなってしまいます。
設定例2は、ノーマル、ボールド、イタリック、ボールド+イタリック全
てについて、"Courier New" と "MS ゴシック" の幅の比を1:2にする、
少々マニアックな設定です。
(1) 設定例1
(create-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 400)
(italic . nil))
'((family . "Courier New")
(family . "MS ゴシック")))
(change-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 700)
(italic . nil))
'((family . "Courier New")
(family . "MS ゴシック"))
1)
(change-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 700)
(italic . t))
'((family . "Courier New")
(family . "MS ゴシック"))
2)
(change-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 700)
(italic . t))
'((family . "Courier New")
(family . "MS ゴシック"))
3)
(2) 設定例2
(create-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 400)
(italic . nil))
'((family . "Courier New")
(family . "MS ゴシック")))
(change-fontset-from-request "myfontset"
'((width . 9)
(height . 16)
(fixed . t)
(weight . 700)
(italic . nil)
(family . "Courier New"))
nil 1)
(change-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 700)
(italic . nil)
(spacing . -1)
(family . "MS ゴシック"))
nil 1)
(change-fontset-from-request "myfontset"
'((width . 9)
(height . 16)
(fixed . t)
(weight . 400)
(italic . t)
(family . "Courier New"))
nil 2)
(change-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 400)
(italic . t)
(family . "MS ゴシック"))
nil 2)
(change-fontset-from-request "myfontset"
'((width . 9)
(height . 16)
(fixed . t)
(weight . 700)
(italic . t)
(family . "Courier New"))
nil 3)
(change-fontset-from-request "myfontset"
'((width . 8)
(height . 16)
(fixed . t)
(weight . 700)
(italic . t)
(spacing . -1)
(family . "MS ゴシック"))
nil 3)
--
三好 雅則 mailto:miyoshi@xxxxxxxxxxxxxxxx
http://www.boreas.dti.ne.jp/~miyoshi/ (Meadow2 のページ始めました)