Skip to content

Commit

Permalink
0.920 修改直排空格問題、位移問題
Browse files Browse the repository at this point in the history
  • Loading branch information
ButTaiwan committed Aug 4, 2021
1 parent 090747d commit f2bc3ce
Show file tree
Hide file tree
Showing 70 changed files with 24 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ releases/
Bpmfh*
tmp/*
BopomofoSmall-Regular.ttf
f_bpmfsrc.js
f_bpmfsrc.js
test.html
Binary file modified ime/fonts/TaigiKaiStd-HI-R.ttf
Binary file not shown.
Binary file modified ime/fonts/TaigiKaiStd-KN-R.ttf
Binary file not shown.
Binary file modified ime/fonts/TaigiKaiStd-POJ-R.ttf
Binary file not shown.
Binary file modified ime/fonts/TaigiKaiStd-TL-R.ttf
Binary file not shown.
Binary file modified ime/fonts/TaigiKaiStd-TLHI-R.ttf
Binary file not shown.
21 changes: 11 additions & 10 deletions make_font.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,15 @@ def align_pos contours, dir
def gen_rotate_glyph sg, advWidth, offx
h = sg['advanceWidth']
paths = []
return nil unless sg.has_key?('contours')
sg['contours'].each { |sp|
path = []
sp.each { |sn|
path << {'x' => sn['y'] + 120 + offx, 'y' => h-sn['x'], 'on' => sn['on']}
if sg.has_key?('contours')
sg['contours'].each { |sp|
path = []
sp.each { |sn|
path << {'x' => sn['y'] + 120 + offx, 'y' => h-sn['x'], 'on' => sn['on']}
}
paths << path
}
paths << path
}
end

return {
'advanceWidth' => advWidth,
Expand Down Expand Up @@ -220,7 +221,7 @@ def read_font fnt, input, ruby_top, ruby_right
fnt['cmap'][uniDec] = gn
$order_sym << gn

if g['advanceWidth'] < 1000 && g['advanceWidth'] != 600 && g.has_key?('contours') #(bpmftones)
if g['advanceWidth'] < 1000 && g['advanceWidth'] != 600 # && g.has_key?('contours') #(bpmftones)
gv = gen_rotate_glyph(g, $fullwidth, ruby_right ? 0 : $ruby_top_offx)
gvn = gn+'.vrt2'
fnt['glyf'][gvn] = gv
Expand Down Expand Up @@ -339,7 +340,7 @@ def create_rubied_glyphs fnt, ruby_top, ruby_right
gly = {
advanceWidth: $fullwidth,
advanceHeight: ruby_top ? $ruby_top_height : $upm,
verticalOrigin: fnt['glyf'][hangn]['verticalOrigin'] + (ruby_top ? 500 : 0),
verticalOrigin: fnt['glyf'][hangn]['verticalOrigin'] + (ruby_top ? ($ruby_top_height - $upm) : 0),
references: [{ glyph: hangn, x: 0, y: 0 }]
}
gly[:references] << { glyph: ruby_top + '_' + readgn, x: 0 + (shifts ? shifts[ruby_top+'_'+readgn] : 0), y: $ruby_top_offy} if ruby_top
Expand Down Expand Up @@ -552,7 +553,7 @@ def make_font_group src_font, c_fname, e_fname, version, tl = false, poj = false

$max_reading_cnt = read_reading_data

version = '0.910'
version = '0.920'
make_font_group 'ZihiKaiStd.ttf', '字咍標楷', 'Taigi KaiStd', version, true, true, true, true, true
make_font_group 'GenRyuMinTW-R.ttf', '字咍源流明體', 'Taigi GenRyuM', version, true, true, true, true, true
make_font_group 'GenRyuMinTW-B.ttf', '字咍源流明體', 'Taigi GenRyuM', version, true, true, true, true
Expand Down
Loading

0 comments on commit f2bc3ce

Please sign in to comment.