JWM 設定 手引き書(3)

2017年8月5日土曜日

このブログで公開している日本語版のフォントは「源の角フォント」を使っています
又 isoデフォルトのフォントを削除しています
その理由は「源の角フォント」でこと足りるからです

削除フォント
/usr/share/X11/fonts/misc
/usr/share/X11/fonts/cursor.pcf-ALT0
/usr/share/X11/fonts/cursor.pcf-ALT1
/usr/share/fonts/default/TTF/DejaVuSans-BoldOblique.ttf
/usr/share/fonts/default/TTF/DejaVuSans-Bold.ttf
/usr/share/fonts/default/TTF/DejaVuSansMono-Oblique.ttf
/usr/share/fonts/default/TTF/DejaVuSansMono.ttf
/usr/share/fonts/default/TTF/DejaVuSans.ttf
/usr/share/fonts/default/TTF/DejaVuSans-Oblique.ttf

puppy linux には
「/usr/share/fonts」「/usr/share/X11/fonts」のフォルダーにフォントが入っている
新規にフォントを追加する場合 当方は
/usr/share/fonts/default/TTF にいれている

X Window Systemのフォントは  core font system と、 Xft の二つの描字システムがつかわれている
環境変数GDK_USE_XFTの値で0のときcore font system、0以外または未設定はXft のようだ
Xft は始めから TrueType 等のスケーラブルフォントの良いサポートを目指して開発されたシステム
最近のソフトは大体これを使用
core X11 font system (伝統的)

Type1フォントは、1980年代半ばにアドビシステムズが導入したアウトライン・フォント
2バイトのフォントのcjkフォントには関係無い
Adobe Readerは、独自のフォント・ラスタライザを使っている ので 必要無い
/usr/X11/lib/X11/fonts/misc にもアドビーのフォントがある
当方 利用価値の無い adobeのフォントを置いとく理由がわからない

子犬の場合のJWMのフォントの設定ファイルは以下にあります
/etc/xdg/templates/_root_.jwmrc
/root/.jwm/themes/*-jwmrc
/root/.jwm/jwmrc-theme
/usr/share/jwm/themes/*-jwmrc
tahrpup や slackoの指定フォントは「DejaVu Sans」になっています
sed コマンドで書き換えれば一発で変更できます
例)
sed -i -e "s/DejaVu Sans/Source Han Sans/g" /etc/xdg/templates/_root_.jwmrc

代替えフォントの設定(/etc/fonts/local.conf)
■Flas Player 文字化け対策
<match target="pattern">
<test qual="any" name="family">
<string>AR PL UMing CN</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Source Han Sans</string>
<string>HCR Batang LVT</string>
</edit>
</match>

最近のFlas Playerのフォントは monospaceに変わったような気がする
少し前の子犬のプレーヤーXine Player

■Xine Player 文字化け対策
<match target="pattern">
<test qual="any" name="family">
<string>Helvetica</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Source Han Sans</string>
<string>HCR Batang LVT</string>
</edit>
</match>

■太字体 斜体 対策
<match target="font">
<!-- check to see if the font is roman -->
<test name="slant">
<const>roman</const>
</test>
<!-- check to see if the pattern requested non-roman -->
<test target="pattern" name="slant" compare="not_eq">
<const>roman</const>
</test>
<!-- multiply the matrix to slant the font -->
<edit name="matrix" mode="assign">
<times>
<name>matrix</name>
<matrix><double>1</double><double>0.2</double>
<double>0</double><double>1</double>
</matrix>
</times>
</edit>
<!-- pretend the font is oblique now -->
<edit name="slant" mode="assign">
<const>oblique</const>
</edit>
</match>

<match target="font">
<!-- check to see if the font is just regular -->
<test name="weight" compare="less_eq">
<const>medium</const>
</test>
<!-- check to see if the pattern requests bold -->
<test target="pattern" name="weight" compare="more">
<const>medium</const>
</test>
<!-- set the embolden flag -->
<edit name="embolden" mode="assign">
<bool>true</bool>
</edit>
</match>

■アンチエイリアス対策
<match target="pattern">
<edit name="hintstyle" mode="prepend">
<const>hintnone</const>
</edit>
<edit name="antialias" mode="prepend">
<bool>true</bool>
</edit>
<edit name="embeddedbitmap">
<bool>false</bool>
</edit>
</match>
</fontconfig>

Copyright © 2010 休眠 | Free Blogger Templates by Splashy Templates | Layout by Atomic Website Templates