|
本帖最后由 chigre3 于 2016-4-5 20:22 编辑 : E/ d# u1 f1 }4 _: l% j
/ k" P2 o+ Y. A2 q; o0 D( T字体测试说明:、
2 D/ \! J% s& Q% @% S7 W1. MDICT PC版,只要指定的字体系统已经安装,包括 CJK擴展E區 都能正常显示; b; X' m" c: M' [0 e1 f1 X3 B: [
2. MDICT ANDROID版,貌似只能支持到 CJK擴展B區 部分字符;7 e% d, T& K5 K0 ?9 [2 S5 _
3. GoldenDict Android版,同样的文件(转stardict格式)和css,CJK擴展E區 正常显示0 b) U/ d! Q; Y4 {
; |8 {- E! p4 |" T+ G3 J
中國哲學書電子化計劃 字體試驗頁7 r6 Z1 g% o2 y
http://ctext.org/font-test-page/zh
G/ g1 I$ `- \$ ]現在公開されている花園明朝:2016年02月01日版$ @3 T7 @! c! \
6 e8 w2 {( t" k+ W LPS. 以下只是简单举例,事实上,手机上用的话,还是尽量少自定义字体为好,加载显示速度有影响啊!
7 [9 F9 T ]# d( c
& O6 |7 v3 f$ n/ H5 E0 x【词典.mdx】的词条都使用了外置式CSS,例如:# v$ ^9 x; C' x3 z. _
-----------------------------------------------------
# {* k$ L* ~0 o( z- word
% ~; m7 C9 S" n( W& K$ K - <link rel="stylesheet" type="text/css" href="css_for_android.css">7 \/ x( X9 V% ~& y% [
- <dic-cont>
5 T, ^7 N! {8 v/ ^; m; ], o0 K" B4 J - <dic-g_f><dic-w>word</dic-w></dic-g_f>3 ]5 o6 p) M2 O3 p* x: u
- <dic-g_f>对应词、释义:</dic-g_f>3 ], I9 k4 g$ |% ^9 h3 E/ u! g6 j
- <dic-g_s><dic-ex_en>example1</dic-ex_en><dic-ex_zh> / 例句1中文翻译</dic-ex_zh></dic-g_s>, K0 r! m( x H; U) E+ k ^
- <dic-g_s><dic-ex_en>example2</dic-ex_en><dic-ex_zh> / 例句2中文翻译</dic-ex_zh></dic-g_s>
6 b7 @0 [9 ^2 Z' V, x5 r3 ~7 r - </dic-cont>- j. Q( U3 Q" J5 H
- </>
复制代码 * m, U+ d4 v4 y& d* J; h( b
-----------------------------------------------------
\5 l: O8 e. U, P【css_for_android.css】里,自定义字体等:
9 v* d$ _% j; U1 k# Z1 }' o
. M( H) |8 n6 I' P- /*MDICT安卓版本自定义几个本词典需要的字体,需将字体复制到SD卡下mdict目录fonts文件夹里*/% c$ @6 c8 W2 I/ b
- @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/pala.ttf');}
$ y3 `; E' c$ f. ^ - @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/palab.ttf');}
' c, D D; \' w# Q - @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/palai.ttf');}; y q: o: k8 W, `% E! Y9 d7 Z8 U
- @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/palabi.ttf');}
5 g, z* Y* |8 w% l6 w - @font-face{font-family:"Georgia";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgia.ttf');}! Z2 I9 R9 n! B) T3 r7 }; Y
- @font-face{font-family:"Georgia";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgiab.ttf');}8 q8 l2 M o) T2 ~
- @font-face{font-family:"Georgia";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiai.ttf');}# N* x( e) n1 w& P! F. i
- @font-face{font-family:"Georgia";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiaz.ttf');}
. o- z, i9 `/ w/ X6 X9 { - @font-face{font-family:"Kaiti";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/simkai.ttf');}; o# u9 A7 u; ~) W8 A5 p |. K
5 H) j2 e" h, y. d* J- ]7 `- /*本CSS只作用于本词典,不影响其他词典的CSS*/+ W5 @( Q6 v b$ o4 _; e
- dic-cont{font-size:1em;font-family:"Palatino Linotype",Georgia,"Times New Roman","Microsoft YaHei",STXihei,serif;}; j; c3 L( a( F% c6 p! Y
- dic-cont dic-g_f{display:block;font-family:inherit;}
- y4 |8 O7 h0 W5 n y- n1 t5 E - dic-cont dic-g_s{display:block;margin-left:1.5em;font-size:.9em;font-family:Georgia,"Times New Roman","KaiTi","Microsoft YaHei",STXihei,serif;}" l7 m9 t: }0 y" ~0 a1 R* v
- dic-cont dic-w{font-size:1.3em;font-weight:bold;color:blue;}
0 X' L! J# S2 L) Q - dic-cont dic-ex_en{color:#369;}$ v$ e/ X. _# _
- dic-cont dic-ex_zh{color:#666;}
复制代码
( y# v7 c3 o9 \2 t- K5 Q7 U& }9 a, e9 Y+ A
截图是真的词典查询结果,和上面的例子不相关的啦~ 效果是同一个道理
/ P! Z! S0 `7 r A# D$ E1 Z D |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?免费注册
x
|