|
本帖最后由 chigre3 于 2016-4-5 20:22 编辑 ; L A* ]2 w0 x r1 f& }- h
7 p: L5 d+ m7 p8 J字体测试说明:、
& \( G% l; K7 Q0 D, `0 h1. MDICT PC版,只要指定的字体系统已经安装,包括 CJK擴展E區 都能正常显示;
! F9 B) T& G0 s& g* r l! L2. MDICT ANDROID版,貌似只能支持到 CJK擴展B區 部分字符;+ O! |( O+ Y2 l
3. GoldenDict Android版,同样的文件(转stardict格式)和css,CJK擴展E區 正常显示
# W& M4 J$ \6 t$ _: W* m& ~& E Z" Y1 T2 b J2 P+ O) P. {7 Z) j
中國哲學書電子化計劃 字體試驗頁
' S' ]0 o0 e' xhttp://ctext.org/font-test-page/zh! ~% j* J# C6 m
現在公開されている花園明朝:2016年02月01日版
0 l6 z/ @. q. y( a% G
9 u$ s% f: Y3 o" n" q7 n" o6 QPS. 以下只是简单举例,事实上,手机上用的话,还是尽量少自定义字体为好,加载显示速度有影响啊!
" v% Y; [" \, J! g* Z V, ~% y) c
t8 S8 {0 g% q; h$ f- j7 B【词典.mdx】的词条都使用了外置式CSS,例如:
; {0 a4 s0 X' s9 F$ Y* ~-----------------------------------------------------: b! Q- x9 ~% L) E2 ^
- word
Y+ z- ^0 {8 P1 `3 J - <link rel="stylesheet" type="text/css" href="css_for_android.css">
5 ~% e% S. g# Y. W, { M - <dic-cont># y$ S; j. U; m& Q5 n
- <dic-g_f><dic-w>word</dic-w></dic-g_f>
, n S0 c& I9 y2 w8 W% q1 ` - <dic-g_f>对应词、释义:</dic-g_f>
. `7 a" [: r8 a) O - <dic-g_s><dic-ex_en>example1</dic-ex_en><dic-ex_zh> / 例句1中文翻译</dic-ex_zh></dic-g_s>
5 q. |- W J# j: J - <dic-g_s><dic-ex_en>example2</dic-ex_en><dic-ex_zh> / 例句2中文翻译</dic-ex_zh></dic-g_s>0 H! U) \! \" Y; b
- </dic-cont>
6 {3 }* O w) @' i" U - </>
复制代码
7 w e, V6 J. L0 f7 w-----------------------------------------------------
# {4 S b! q. {: Z+ S【css_for_android.css】里,自定义字体等:' m5 ]. W% t1 |0 v2 m5 @, P) q
" R0 q+ l* r8 g& }. v- /*MDICT安卓版本自定义几个本词典需要的字体,需将字体复制到SD卡下mdict目录fonts文件夹里*/
: p3 [' h+ a- `& z- q3 ~/ H' \ - @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/pala.ttf');}
- C- ], {. h2 E' z) U, R3 n( R - @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/palab.ttf');}
u0 e% y7 _3 C" Y - @font-face{font-family:"Palatino Linotype";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/palai.ttf');}
6 d5 R( o! S3 E- h9 W3 x - @font-face{font-family:"Palatino Linotype";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/palabi.ttf');}+ H1 v0 {/ c+ D! L: W( G( E+ }) [
- @font-face{font-family:"Georgia";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgia.ttf');}
6 |, t. h8 [* O$ Z - @font-face{font-family:"Georgia";font-weight:bold;font-style:normal;src:url('file:///sdcard/mdict/fonts/georgiab.ttf');}
3 b+ z* e% V8 `% K, @ - @font-face{font-family:"Georgia";font-weight:normal;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiai.ttf');}' ?" H: O7 {% f6 }* t. i
- @font-face{font-family:"Georgia";font-weight:bold;font-style:italic;src:url('file:///sdcard/mdict/fonts/georgiaz.ttf');}3 K8 i9 R* ~6 X# {9 |; C6 K
- @font-face{font-family:"Kaiti";font-weight:normal;font-style:normal;src:url('file:///sdcard/mdict/fonts/simkai.ttf');}0 x# o. g5 ]+ A' L. p
( B6 P0 I+ ~% J+ a1 H. i& w. w; w( e- /*本CSS只作用于本词典,不影响其他词典的CSS*/
7 q6 E+ ?- J' a - dic-cont{font-size:1em;font-family:"Palatino Linotype",Georgia,"Times New Roman","Microsoft YaHei",STXihei,serif;}
' a" s/ W* B3 O9 g3 k0 t$ A: g - dic-cont dic-g_f{display:block;font-family:inherit;}8 N* t/ U) U. x
- 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;} S+ @' M: V A$ Z2 x/ q6 P
- dic-cont dic-w{font-size:1.3em;font-weight:bold;color:blue;}5 v7 R! O( N$ _; \8 I) O
- dic-cont dic-ex_en{color:#369;}: F L. Y0 M3 V# |& I6 H) [
- dic-cont dic-ex_zh{color:#666;}
复制代码
' d! v8 I6 h2 M; o
! S4 g# v& ^! B2 |截图是真的词典查询结果,和上面的例子不相关的啦~ 效果是同一个道理& R: p0 I# _1 I! l! G
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?免费注册
x
|