> Here is a initial version of Chinese font metrics tested by MaQiYuan and SuJie.
> This version can works well with Chinese on normal Chinese texts.
> We are now collecting more sentences to test our metrics.
new file: jfm-banjiao.lua
new file: jfm-kaiming.lua
modified: jfm-quanjiao.lua
new file: metrics-test-zh.pdf
new file: metrics-test-zh.tex
--- /dev/null
+luatexja.jfont.define_jfm {
+ dir = 'yoko',
+ zw = 1.0, zh = 1.0,
+
+ [0] = {
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ --[1] = { 0.5 , 0.0, 0.5 },
+ [3] = { 0.125, 0.0, 0.125 }
+ }
+ },
+
+ [1] = { -- fw. opening punctuations
+ chars = {
+ 0x2018, 0x201C, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016,
+ 0x3018, 0x301D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F
+ },
+ align = 'right', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [3] = { 0.25, 0.0, 0.25 }
+ }
+ },
+
+ [2] = { -- fw. closing/colon/dot punctuations, except 4 & 7
+ chars = {
+ 0x2019, 0x201D, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015,
+ 0x3017, 0x3019, 0x301F, 0xFF09, 0xFF0C, 0xFF3D, 0xFF5D, 0xFF60,
+ 0xFF0E, 0xFF1A, 0xFF1B, 0xFF01, 0xFF1F
+ },
+ align = 'left', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ --[0] = { 0.5 , 0.0, 0.5 },
+ --[1] = { 0.5 , 0.0, 0.5 },
+ [3] = { 0.125, 0.0, 0.125 },
+ [5] = { 0.5 , 0.0, 0.5 }
+ }
+ },
+
+ [3] = { -- fw. middle dot punctuations
+ chars = {0x30FB, 0x00B7},
+ align = 'middle', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [0] = { 0.125, 0.0, 0.125 },
+ [1] = { 0.125, 0.0, 0.125 },
+ [2] = { 0.125, 0.0, 0.125 },
+ [3] = { 0.5 , 0.0, 0.5 },
+ [4] = { 0.25, 0.0, 0.25 },
+ [5] = { 0.25, 0.0, 0.25 },
+ [7] = { 0.25, 0.0, 0.25 }
+ }
+ },
+
+ [4] = { -- ideographic full stop
+ chars = {0x3002},
+ align = 'left', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ --[0] = { 0.5 , 0.0, 0.0 },
+ [1] = { 0.5 , 0.0, 0.0 },
+ [3] = { 0.75, 0.0, 0.25 },
+ [5] = { 0.5 , 0.0, 0.0 }
+ }
+ },
+
+ [5] = { -- fw. dash punctuations
+ chars = { 0x2015, 0x2025, 0x2026, 0x2014, 0x301C, 0xFF5E },
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [1] = { 0.5 , 0.0, 0.5 },
+ [3] = { 0.25, 0.0, 0.25 }
+ },
+ kern = {
+ [5] = 0.0
+ }
+ },
+
+ [6] = { -- box end
+ chars = {'boxbdd'},
+ },
+
+ [7] = { -- ideographic comma
+ chars = {0x3001},
+ align = 'left', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [0] = { 0.5 , 0.0, 0.25 },
+ [1] = { 0.5 , 0.0, 0.25 },
+ [3] = { 0.25, 0.0, 0.25 },
+ [5] = { 0.5 , 0.0, 0.25 }
+ }
+ },
+
+}
--- /dev/null
+luatexja.jfont.define_jfm {
+ dir = 'yoko',
+ zw = 1.0, zh = 1.0,
+
+ [0] = {
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ --[1] = { 0.5 , 0.0, 0.5 },
+ [3] = { 0.125, 0.0, 0.125 }
+ }
+ },
+
+ [1] = { -- fw. opening punctuations
+ chars = {
+ 0x2018, 0x201C, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016,
+ 0x3018, 0x301D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F
+ },
+ align = 'right', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [3] = { 0.25, 0.0, 0.25 }
+ }
+ },
+
+ [2] = { -- fw. closing/colon/dot punctuations, except 4 & 7
+ chars = {
+ 0x2019, 0x201D, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015,
+ 0x3017, 0x3019, 0x301F, 0xFF09, 0xFF0C, 0xFF3D, 0xFF5D, 0xFF60,
+ 0xFF0E, 0xFF1A, 0xFF1B
+ },
+ align = 'left', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ --[0] = { 0.5 , 0.0, 0.5 },
+ --[1] = { 0.5 , 0.0, 0.5 },
+ [3] = { 0.125, 0.0, 0.125 },
+ [5] = { 0.5 , 0.0, 0.5 }
+ }
+ },
+
+ [3] = { -- fw. middle dot punctuations
+ chars = {0x30FB, 0x00B7},
+ align = 'middle', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [0] = { 0.125, 0.0, 0.125 },
+ [1] = { 0.125, 0.0, 0.125 },
+ [2] = { 0.125, 0.0, 0.125 },
+ [3] = { 0.5 , 0.0, 0.5 },
+ [4] = { 0.25, 0.0, 0.25 },
+ [5] = { 0.25, 0.0, 0.25 },
+ [7] = { 0.25, 0.0, 0.25 }
+ }
+ },
+
+ [4] = { -- ideographic full stop
+ chars = {0x3002, 0xFF1F, 0xFF01},
+ align = 'left', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [0] = { 0.5 , 0.0, 0.0 },
+ [1] = { 0.5 , 0.0, 0.0 },
+ [3] = { 0.75, 0.0, 0.25 },
+ [5] = { 0.5 , 0.0, 0.0 }
+ }
+ },
+
+ [5] = { -- fw. dash punctuations
+ chars = { 0x2015, 0x2025, 0x2026, 0x2014, 0x301C, 0xFF5E },
+ align = 'left', left = 0.0, down = 0.0,
+ width = 1.0, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [1] = { 0.5 , 0.0, 0.5 },
+ [3] = { 0.25, 0.0, 0.25 }
+ },
+ kern = {
+ [5] = 0.0
+ }
+ },
+
+ [6] = { -- box end
+ chars = {'boxbdd'},
+ },
+
+ [7] = { -- ideographic comma
+ chars = {0x3001},
+ align = 'left', left = 0.0, down = 0.0,
+ width = 0.5, height = 0.88, depth = 0.12, italic=0.0,
+ glue = {
+ [0] = { 0.5 , 0.0, 0.25 },
+ [1] = { 0.5 , 0.0, 0.25 },
+ [3] = { 0.25, 0.0, 0.25 },
+ [5] = { 0.5 , 0.0, 0.25 }
+ }
+ },
+
+}
-ltj.define_jfm {
+luatexja.jfont.define_jfm {
dir = 'yoko',
zw = 1.0, zh = 1.0,
}
},
-}
\ No newline at end of file
+}
--- /dev/null
+\input luatexja-core.sty\r
+\jfont\fmdisplay={name:SimSun:jfm=ujis} at 12pt\r
+\jfont\banjiao={name:SimSun:jfm=banjiao} at 12pt\r
+\jfont\quanjiao={name:SimSun:jfm=quanjiao} at 12pt\r
+\jfont\kaiming={name:SimSun:jfm=kaiming} at 12pt\r
+\def\texta{a). ……于是她近乎歇斯底里的喊道:“这真的不是我做的!……”然而这么熟识的人中间,竟然没有一个相信她这个“疯子”。}\r
+\def\textb{b). 他端起茶杯,“俗话说的好,‘到什么山唱什么歌。’”呷了一口茶,继续说到:“像你这样不识抬举,总有一天会吃亏的!”}\r
+\fmdisplay\r
+\beginsection A. 半角标点样式\r
+\r
+\smallskip\r
+{\banjiao\texta\par\textb}\r
+\beginsection B. 全角标点样式\r
+\r
+\smallskip\r
+{\quanjiao\texta\par\textb}\r
+\beginsection C. 开明标点样式\r
+\r
+\smallskip\r
+{\kaiming\texta\par\textb}\r
+\bye
\ No newline at end of file