|
本帖最后由 chigre3 于 2016-4-5 20:22 编辑 $ Y5 I3 `/ d( N) A3 \6 D( N3 A
( `" R2 P9 k, T; I8 K3 P$ z
字体测试说明:、 y; G* i# v+ f5 ? v
1. MDICT PC版,只要指定的字体系统已经安装,包括 CJK擴展E區 都能正常显示;6 Z5 b7 I' c. Q- g
2. MDICT ANDROID版,貌似只能支持到 CJK擴展B區 部分字符;
5 {/ s, w0 ?, q" r! d' F, n& U3. GoldenDict Android版,同样的文件(转stardict格式)和css,CJK擴展E區 正常显示& P- U o) S2 |' Z% i
4 m: f# Z3 n. |7 r中國哲學書電子化計劃 字體試驗頁+ }* b" g Z& A2 V" w1 Y( `
http://ctext.org/font-test-page/zh2 Z, K) B$ q3 [/ E9 ~& r
現在公開されている花園明朝:2016年02月01日版
) q6 R/ k' D+ d! n& H% x5 x6 O& _# e" b7 E% F- l+ P4 U
PS. 以下只是简单举例,事实上,手机上用的话,还是尽量少自定义字体为好,加载显示速度有影响啊!
( d6 f- _3 `4 ^" Q0 ]5 ?4 |5 r1 G/ S v! p3 Y) i. P( O
【词典.mdx】的词条都使用了外置式CSS,例如:
! j+ p7 R2 A/ o-----------------------------------------------------
# N1 D3 Z1 X3 b* Y- word
# r7 `7 |# L( L8 _$ Q% n - <link rel="stylesheet" type="text/css" href="css_for_android.css">
5 d, g/ b5 q2 b - <dic-cont>
* F& b- g+ ]5 N* Z - <dic-g_f><dic-w>word</dic-w></dic-g_f>
# V% ?$ `. P; h W - <dic-g_f>对应词、释义:</dic-g_f>
0 @7 M# X4 f6 Y- p# P - <dic-g_s><dic-ex_en>example1</dic-ex_en><dic-ex_zh> / 例句1中文翻译</dic-ex_zh></dic-g_s>9 k' J9 I7 U9 S" o U1 u% m2 y, j
- <dic-g_s><dic-ex_en>example2</dic-ex_en><dic-ex_zh> / 例句2中文翻译</dic-ex_zh></dic-g_s>
: ]+ w: b3 n6 |- Y! b - </dic-cont>3 z8 Z; {- ]* y
- </>
复制代码 3 I( Y& B7 v' Q5 R8 [
-----------------------------------------------------
1 ?, l5 L$ M2 g8 V【css_for_android.css】里,自定义字体等:, F! v' D$ d3 z2 p/ S, D9 Y
& q$ n( L+ J6 F/ ?, h4 p- /*MDICT安卓版本自定义几个本词典需要的字体,需将字体复制到SD卡下mdict目录fonts文件夹里*/# x' R8 z- {- z+ b$ f4 _
- @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/pala.ttf');}1 W2 h' q3 q$ O! I6 H2 I$ o
- @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/palab.ttf');}
, d% U+ B: j3 B, w8 K7 R! t$ Q - @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/palai.ttf');}9 o4 m3 f3 b7 B I4 P( @
- @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/palabi.ttf');}; z9 S- `- w* E* J$ p7 C
- @font-face{font-family:"Georgia";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgia.ttf');}
' o& L: G- E8 w- b1 |/ O$ V. v - @font-face{font-family:"Georgia";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgiab.ttf');}$ ~ c& }7 X; \& b, L5 U
- @font-face{font-family:"Georgia";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiai.ttf');}
* {& x: r0 f5 v c - @font-face{font-family:"Georgia";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiaz.ttf');}
: D }3 ?7 F% ^3 E. p - @font-face{font-family:"Kaiti";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/simkai.ttf');}
: G; v/ \( P+ H6 i# t' _ - 9 _& K P, w' N J) K7 W
- /*本CSS只作用于本词典,不影响其他词典的CSS*/7 ?! n [0 }$ G @
- dic-cont{font-size:1em;font-family:"Palatino Linotype",Georgia,"Times New Roman","Microsoft YaHei",STXihei,serif;}
6 S# V* b" F# r) S8 A: Z! u, [ - dic-cont dic-g_f{display:block;font-family:inherit;}9 @* u' U" [7 z G
- 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;}
& A B% ^0 s. r$ Q7 |; z5 ` - dic-cont dic-w{font-size:1.3em;font-weight:bold;color:blue;}
! V' [+ J' `, W: E9 c+ d: V% Y - dic-cont dic-ex_en{color:#369;}
& p, T/ y7 T9 y8 [' v: y* ~* \ - dic-cont dic-ex_zh{color:#666;}
复制代码 - P9 E9 h; n# v ?: e* U, a# L
& z5 d. \. |# g }. m* {
截图是真的词典查询结果,和上面的例子不相关的啦~ 效果是同一个道理7 ]+ n5 q9 C5 O* F# d1 Z. [
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?免费注册
x
|