|
本帖最后由 chigre3 于 2016-4-5 20:22 编辑 ' V; n. d( F# f8 ?2 R3 S
0 C( i) J- f* z* F
字体测试说明:、
, T4 e! k9 i9 p1. MDICT PC版,只要指定的字体系统已经安装,包括 CJK擴展E區 都能正常显示;+ |$ O7 \, d- S; A9 ?7 Z) C$ Q3 z P
2. MDICT ANDROID版,貌似只能支持到 CJK擴展B區 部分字符;
2 |1 |$ Z$ @" Y; R$ j0 Q% Z) P3. GoldenDict Android版,同样的文件(转stardict格式)和css,CJK擴展E區 正常显示
) X; h" [8 K8 T# |& e3 }% k p, J' B+ i o8 k4 X
中國哲學書電子化計劃 字體試驗頁
, ?8 T+ `" g6 d' i% Ohttp://ctext.org/font-test-page/zh$ m/ f9 T/ B$ d
現在公開されている花園明朝:2016年02月01日版
- ^& T( K* z: [0 {0 q
2 K2 ~- N4 M3 Y- B* X' Y$ wPS. 以下只是简单举例,事实上,手机上用的话,还是尽量少自定义字体为好,加载显示速度有影响啊!
! o* ?. k+ U, m* I \% V- E# h2 C8 C( [# J9 Z3 h) I- H* ^! c$ N
【词典.mdx】的词条都使用了外置式CSS,例如:4 ^& D8 h8 c2 Y5 K3 f
-----------------------------------------------------( i/ m! Y. c" `: V* y+ U: B; h3 R
- word& B- k" U5 I9 \" z# J* r: F1 S, q: I
- <link rel="stylesheet" type="text/css" href="css_for_android.css">
. |: ^3 `- ~+ ?% Z) X( E - <dic-cont>
' C& o8 k' i+ k- `3 f - <dic-g_f><dic-w>word</dic-w></dic-g_f>
, m" u0 P" p# V$ ^ - <dic-g_f>对应词、释义:</dic-g_f>, b; a' S0 s7 W8 M" o
- <dic-g_s><dic-ex_en>example1</dic-ex_en><dic-ex_zh> / 例句1中文翻译</dic-ex_zh></dic-g_s>
$ ~% K! X6 C% s4 i$ x. S - <dic-g_s><dic-ex_en>example2</dic-ex_en><dic-ex_zh> / 例句2中文翻译</dic-ex_zh></dic-g_s>+ g' Y; [& k/ e5 V Z
- </dic-cont>
1 ^6 B3 {, J: ]2 _ - </>
复制代码 . n3 E( W; l, v# N2 k% p
-----------------------------------------------------
5 @( I& ?& q6 _/ }) k' v【css_for_android.css】里,自定义字体等:$ j+ }% Y Y) I1 w) Y
! K1 ?! L8 D& k4 h* {9 [1 j- /*MDICT安卓版本自定义几个本词典需要的字体,需将字体复制到SD卡下mdict目录fonts文件夹里*/ J; b) M+ ~* V1 i9 N* h2 w0 Z
- @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/pala.ttf');}. W' E" g0 V' h# K9 A0 l* k& f
- @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/palab.ttf');}/ o5 V) x6 P" N$ i
- @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/palai.ttf');}- T, t" B7 {5 ~2 {! t4 s
- @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/palabi.ttf');}% c2 y& _1 J/ u. e" ]3 g
- @font-face{font-family:"Georgia";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgia.ttf');}
2 O; {% D4 C F1 D, z R - @font-face{font-family:"Georgia";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgiab.ttf');}
$ `( K6 y4 v/ X q - @font-face{font-family:"Georgia";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiai.ttf');}0 d; d5 K0 S6 B s/ Y2 |
- @font-face{font-family:"Georgia";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiaz.ttf');}( _+ f/ @! S: ~: o- S- Q& B
- @font-face{font-family:"Kaiti";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/simkai.ttf');}
9 ~2 K( K* E4 ~: e) p - q9 H* R# z# T1 w3 I* g
- /*本CSS只作用于本词典,不影响其他词典的CSS*/
; v! z/ W' ]8 f) _" j# t' d - dic-cont{font-size:1em;font-family:"Palatino Linotype",Georgia,"Times New Roman","Microsoft YaHei",STXihei,serif;}
4 |# e1 k$ @1 L1 W) y - dic-cont dic-g_f{display:block;font-family:inherit;}
) {- @9 Z; U8 h5 } - 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;}5 Q" Q/ a6 e! P
- dic-cont dic-w{font-size:1.3em;font-weight:bold;color:blue;}5 O1 c; J& d7 `1 z
- dic-cont dic-ex_en{color:#369;}6 P1 Q5 y3 M0 i. g3 V
- dic-cont dic-ex_zh{color:#666;}
复制代码
( {3 p. ~$ B e. z5 W, M9 H- e& l/ k
截图是真的词典查询结果,和上面的例子不相关的啦~ 效果是同一个道理, `6 L# c) P. t% [1 t% t5 I/ l8 G
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?免费注册
x
|