#!/usr/bin/fontforge

Open("mplus-1c-regular-new.ttf")
Select(32,12292,12294,19967,64256,65518)
ScaleToEm(4000)
Copy()

Open("ume-pgo4.ttf")
Select(32,12292,12294,19967,64256,65518)
Paste()

# fix "ヱ"
#Select(12529)
#Scale(100,82)

# remove unnecessary characters
# (fix for vertical writing in OpenOffice)
Select(65511,66135)
Clear()

SetOS2Value("HHeadAscent",3900)
SetOS2Value("HHeadDescent",-970)

SetFontNames("UmePlus-P-Gothic","UmePlus P Gothic","UmePlus P Gothic")
SetTTFName(0x409,1,"UmePlus P Gothic")
SetTTFName(0x409,3,"UmePlus P Gothic")
SetTTFName(0x409,4,"UmePlus P Gothic")
SetTTFName(0x411,1,"UmePlus P Gothic")
SetTTFName(0x411,3,"UmePlus P Gothic")
SetTTFName(0x411,4,"UmePlus P Gothic")

Generate("umeplus-p-gothic.ttf")
