JWM - 共通事項 - フォント

 クラウディア
1. 概要
2. 定義
3. どれが本物?
4. antiX
5. FreeBSD
6. ArcoLinux

1. 概要

 フォントの変更方法です。

2. 定義

 フォントの定義は
プラットフォーム  定義ファイル   備考 
AntiX ~/.jwm/themes/テーマファイル
ArcoLinux ~/.config/jwm/theme
FreeBSD ~/.jwmrc

 にあって、どれもおおむね


<Font>DejaVu Sans 9</Font>
 てな感じで定義されています。  これを、フォント名やら、サイズやら変更すればいいわけです。

3. どれが本物?

 ところがだ・・・。  フォントの定義の記述方法が、あれこれあって、どれが正解なのかわからない。  おそらくは、それぞれ正解なのかもしれませんが、それが、使おうとするフォントの定義としてあっているかわからない。  順序バラバラになりますが、主なものをいくつか抜き出してみますと。 ・PrettyPink

    <Font>Ubuntu Regular 10</Font>
・brown

    <Font>DejaVu Sans 12:bold</Font>

    <Font>DejaVu Sans 12</Font>

    <Font>Ionic Charge-12</Font>
 これなんか、3つの書き方が混在しております。 ・red

    <Font>DejaVu Sans-13:bold</Font>
 「Regular」や「bold」の位置は、どこなのか、先頭は大文字なのか、小文字なのか、「:」はつけるのかつけないのか。  サイズの位置はどこなのか、「-」はつけるのかつけないのか。  ひとつのファイルの中でも記述がまちまちでさっぱりわからない・・・。  設定して表示し、確認していくしかないという情けないことになるのです。

4. antiX

 「antiX 19.2」のテーマは、以下のように記述されています。  そう長くないので、全文掲載します。
<!-- Title: Jwm-Vista Author: Tom new for jwm 2.0, replaces borderstyle above --> 
<!-- Modified by missTell for antiX 19 --> 

<JWM>

<WindowStyle> 
	<Font>Ubuntu Regular 10</Font> 
	<Width>2</Width> 
	<Height>20</Height> 
	<Active> 
		<Foreground>gray20</Foreground> 
		<Background>gray70</Background> 
	<Outline>black</Outline> 
	</Active> 
	 
		<Foreground>gray70</Foreground> 
		<Background>gray20</Background> 
	<Outline>black</Outline> 
	 
</WindowStyle> 

<TaskListStyle> 
	<Font>Ubuntu Regular 12</Font> 
	<Active>
	<Foreground>gray90</Foreground> 
	<Background>gray30</Background> 
	</Active>
	
	<Foreground>gray90</Foreground> 
	<Background>gray50</Background> 
	
</TaskListStyle> 

<TrayStyle> 
	<Font>Ubuntu Regular 12</Font> 
	<Background>gray20</Background> 
	<Foreground>gray90</Foreground> 
</TrayStyle> 

<ClockStyle>
	<Font>Ubuntu Regular 12</Font>
	<Foreground>gray90</Foreground>
	<Background>gray20</Background>
</ClockStyle>

<PagerStyle> 
	<Outline>black</Outline> 
	<Foreground>gray80</Foreground> 
	<Background>gray50</Background> 
	<Active>
	<Foreground>#2196F3</Foreground> 
	<Background>gray50</Background> 
	</Active>
</PagerStyle> 

<MenuStyle> 
	<Font>Ubuntu Regular 10</Font> 
	<Foreground>gray90</Foreground> 
	<Background>gray20</Background> 
        <Outline>black</Outline>
       <Active>
	<Foreground>white</Foreground> 
	<Background>#2196F3</Background> 
	</Active>
        <Opacity>0</Opacity>
</MenuStyle> 

<PopupStyle enabled="true">
	<Font>Ubuntu Regular 10</Font> 
	<Outline>black</Outline> 
	<Foreground>black</Foreground> 
	<Background>gray80</Background> 
</PopupStyle>

</JWM>


    <Font>Ubuntu Regular サイズ</Font>
 とか、書いてある箇所を書き換えるのですが・・・。  わたしの使用する「MigMix 1M」の場合、以下のような書き方に変えてやります。

    <Font>MigMix 1M Regular-サイズ</Font>

5. FreeBSD

 「FreeBSD」では、「~/.jwmrc」に「Sans-9」の定義しかなかったので、簡単に

vi ~/.jwmrc
 一発で、全部変えちゃいます。「MigMix 1M 10px」を設定するものとして

:%s/Sans-9/MigMix 1M-10/g
 のコマンド一発です。  「2.4.2_1」で、デフォルトのフォントが変わりましたので、コマンドも変更。

:%s/Sans-12/MigMix 1M-10/g

6. ArcoLinux

 「ArcoLinux」では、「Font」で「grep」をかけると

$ grep Font ~/.config/jwm/theme
      <Font align="center">Noto NotoSans-11:bold</Font>
      <Font>NotoSans-11</Font>
      <Font>NotoSans-11</Font>
      <Font>NotoSans-11</Font>
      <Font>NotoSans-11</Font>
      <Font>NotoSans-11</Font>
      <Font>NotoSans-11</Font>
      <Font>NotoSans-11</Font>
 と、これもすべて同じフォントが設定されているようなので、都合がいい。

vi ~/.config/jwm/theme
 一発で、全部変えちゃいます。「MigMix 1M 10px」を設定するものとして

:%s/NotoSans-11/MigMix 1M-10/g
 ログインしなおせば、フォントが変更されています。
ハイスピードプランU-NEXTJETBOY