/* Stroke SVG from M+ SVG */
/* note: mplus_outline_fonts/svg.d/_works/*.ai to SVG convert with Scribus */

/* build: gcc `pkg-config libxml-2.0 --cflags` storokem.c `pkg-config libxml-2.0 --libs` -lm -o storokem */

#include "mplusstroke.h"

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <iconv.h>
#include <stdbool.h>
#include <sys/param.h>
#include <unistd.h>
#include <libxml/xmlreader.h>

// kanji-11のYが文字１つ分多い対応
int MPLUS_for11 = 0;

char MPLUS_hg1[] = "あいうえおぁぃぅぇぉゔかきくけこがぎぐげごさしすせそざじずぜぞたちつてとだぢづでどなにぬねのはひふへほばびぶべぼぱぴぷぺぽまみむめもや、ゆ。よっゃゅょゎらりるれろわゐゑをん";
double MPLUS_hg1_pos[] = {
	550, 0,
	650, 0,
	750, 0,
	850, 0,
	950, 0,
	1100, 0,
	1200, 0,
	1300, 0,
	1400, 0,
	1500, 0,
	1650, 0,
	550, 350,
	650, 350,
	750, 350,
	850, 350,
	950, 350,
	1100, 350,
	1200, 350,
	1300, 350,
	1400, 350,
	1500, 350,
	550, 700,
	650, 700,
	750, 700,
	850, 700,
	950, 700,
	1100, 700,
	1200, 700,
	1300, 700,
	1400, 700,
	1500, 700,
	550, 1050,
	650, 1050,
	750, 1050,
	850, 1050,
	950, 1050,
	1100, 1050,
	1200, 1050,
	1300, 1050,
	1400, 1050,
	1500, 1050,
	550, 1400,
	650, 1400,
	750, 1400,
	850, 1400,
	950, 1400,
	550, 1750,
	650, 1750,
	750, 1750,
	850, 1750,
	950, 1750,
	1100, 1750,
	1200, 1750,
	1300, 1750,
	1400, 1750,
	1500, 1750,
	1650, 1750,
	1750, 1750,
	1850, 1750,
	1950, 1750,
	2050, 1750,
	550, 2100,
	650, 2100,
	750, 2100,
	850, 2100,
	950, 2100,
	550, 2450,
	650, 2450,
	750, 2450,
	850, 2450,
	950, 2450,
	1100, 2450,
	1200, 2450,
	1300, 2450,
	1400, 2450,
	1500, 2450,
	550, 2800,
	650, 2800,
	750, 2800,
	850, 2800,
	950, 2800,
	550, 3150,
	650, 3150,
	750, 3150,
	850, 3150,
	950, 3150,
};

char MPLUS_kk1[] = "アイウエオァィゥェォヴヵヶカキクケコガギグゲゴサシスセソザジズゼゾタチツテトダヂヅデドナニヌネノハヒフヘホバビブベボパピプペポマミムメモヤーユ〜ヨッャュョヮラリルレロワヰヱヲン゛ｱｲｳｴｵｧｨｩｪｫｶｷｸｹｺｻｼｽｾｿﾀﾁﾂﾃﾄﾅﾆﾇﾈﾉﾊﾋﾌﾍﾎﾏﾐﾑﾒﾓﾔﾕﾖｬｭｮｯｰﾗﾘﾙﾚﾛﾜｦﾝﾞﾟ";
double MPLUS_kk1_pos[] = {
	550, 0,
	650, 0,
	750, 0,
	850, 0,
	950, 0,
	1100, 0,
	1200, 0,
	1300, 0,
	1400, 0,
	1500, 0,
	1650, 0,
	1800, 0,
	1900, 0,
	550, 350,
	650, 350,
	750, 350,
	850, 350,
	950, 350,
	1100, 350,
	1200, 350,
	1300, 350,
	1400, 350,
	1500, 350,
	550, 700,
	650, 700,
	750, 700,
	850, 700,
	950, 700,
	1100, 700,
	1200, 700,
	1300, 700,
	1400, 700,
	1500, 700,
	550, 1050,
	650, 1050,
	750, 1050,
	850, 1050,
	950, 1050,
	1100, 1050,
	1200, 1050,
	1300, 1050,
	1400, 1050,
	1500, 1050,
	550, 1400,
	650, 1400,
	750, 1400,
	850, 1400,
	950, 1400,
	550, 1750,
	650, 1750,
	750, 1750,
	850, 1750,
	950, 1750,
	1100, 1750,
	1200, 1750,
	1300, 1750,
	1400, 1750,
	1500, 1750,
	0, 1750,
	100, 1750,
	200, 1750,
	300, 1750,
	400, 1750,
	550, 2100,
	650, 2100,
	750, 2100,
	850, 2100,
	950, 2100,
	550, 2450,
	650, 2450,
	750, 2450,
	850, 2450,
	950, 2450,
	1100, 2450,
	1200, 2450,
	1300, 2450,
	1400, 2450,
	1500, 2450,
	550, 2800,
	650, 2800,
	750, 2800,
	850, 2800,
	950, 2800,
	550, 3150,
	650, 3150,
	750, 3150,
	850, 3150,
	950, 3150,
	1300, 3150,
	2350, 0,
	2450, 0,
	2550, 0,
	2650, 0,
	2750, 0,
	2900, 0,
	3000, 0,
	3100, 0,
	3200, 0,
	3300, 0,
	2350, 350,
	2450, 350,
	2550, 350,
	2650, 350,
	2750, 350,
	2350, 700,
	2450, 700,
	2550, 700,
	2650, 700,
	2750, 700,
	2350, 1050,
	2450, 1050,
	2550, 1050,
	2650, 1050,
	2750, 1050,
	2350, 1400,
	2450, 1400,
	2550, 1400,
	2650, 1400,
	2750, 1400,
	2350, 1750,
	2450, 1750,
	2550, 1750,
	2650, 1750,
	2750, 1750,
	2350, 2100,
	2450, 2100,
	2550, 2100,
	2650, 2100,
	2750, 2100,
	2350, 2450,
	2450, 2450,
	2550, 2450,
	2900, 2450,
	3000, 2450,
	3100, 2450,
	3200, 2450,
	3300, 2450,
	2350, 2800,
	2450, 2800,
	2550, 2800,
	2650, 2800,
	2750, 2800,
	2350, 3150,
	2450, 3150,
	2550, 3150,
	2650, 3150,
	2750, 3150,
};

double* g_pdKana_pos;
char* g_strKana;
size_t g_sizKana_pos_size;

char MPLUS_kanji01[] = "亜大犬一二三四五六七八九十車人子空右男女日月火水木金土年手天見山雨上下文田川竹林森父交校学字中虫目口正本早出化花休青小夕名町百千円赤生耳王立草気貝入石左足力先糸玉寸村門間白音戸編集衣表丁示禾多移重動万昜場斤所而端末復履止歴言几又設定受信全送乍作成反返員相箱控高稿検索牛件工差云転肖削余除米迷或心惑欠次戻付寺待才開閉告浩司用甬通矢知己共巽選尺択新着未冗士売読公総攵数卩夘宛忝添呆保仔存夫規愛由曲豆豊聿書体弓引羽雲古吉舌不園呂宮官管甲申里理情辛幸報消去丈東更再込自問隹進合谷容曰且旦亘量追加広拡但佰伯宿縮遠可何斗科夏家歌画回会母毎海絵卜外角楽活丸岩彦頁顔汽記巾帚帰魚亠京国吾語升算組時図育首道唯曜内強方平来計孝教近兄彡形元原午後光考行黄黒今細市姉思氏紙室社弱秋周週春少色良食親西声星晴刀切雪舟船泉線前走太台也地池茶昼長鳥朝直弟占店事点電久夂冬当答頭同冂南肉馬買麦半釆香番風分聞歩北妹明鳴毛夜予野友話悪安暗医委意宀完院飲冖軍運永泳駅央横屋皿温荷介界匕比皆階寒咸感英映暎嘆漢館干岸已巳起其期各客究急乃及級求球夭呑喬橋業尸局艮銀匚区苦具丿尹君系係軽血夬泱決研県庫广胡湖向巷港呈号根奈祭仕死吏使始旨指歯詩持式弌弍";
char MPLUS_kanji02[] = "実与写者主守取酉酒州拾終習住暑助召昭冏商章券勝乗植身神真深世束敕整昔想息速族無関他打対弋代弔第疋是題灰炭短炎談注柱帳調壬廷廴庭笛失鉄都甘廿度投島湯登癶等童厂辰農支皮波配倍畑発坂板非悲美昌晶品畠鼻筆氷秒丙病貞負部服冨富福勿句勹物免勉放味叩命面囗役彳薬油有遊羊洋葉陽様洛落充流旅両緑礼列歹練路和案以位井囲胃印宋栄塩億果貨課牙芽改廾戒械害圭街覚観願布希季紀喜旗器幾機我義議泣救給挙漁協鏡競亟極訓郡径刑型景芸結建健験固功好候亢航康采菜最材昨札吊刷殺察参産散残史試旧児治辞借種祝順初松笑唱尭焼象照賞巨臣省清争静席責積折即節説浅単戦伏状吠然居倉巣則側続卒孫帯隊達置仲于宇貯兆腸低底亭停勺丶的典伝徒奴努灯堂党常働特得毒熱含念敗梅恵専博飯飛弗費必票標符苻府副粉丘兵別辺亦変恋便包法亡望牧満爪瓜脈民約勇栗要養浴利陸料匸冊侖輪類令个沖冲冷冫例連老労録圧困因囚営韋偉緯韓衛易否盃益液寅演応往畄桜恩仮価河咼渦過架賀快解格確額刊汗汁肝幹祐慎旬荀苟芍敬貫慣眼基奇寄技逆許境均禁群経素潔険限現減故個隻隼護効厚耕鉱冓構講溝購興昆毘混査巛災妻採際在財罪卆雑酸賛志枝帥師盗姿資飼似識質舎射謝授修辻述術淮準凖序招詔紹沼了承征柾鉦証条織職制";
char MPLUS_kanji03[] = "徃性牲姓政勢靖請精錆製悦税鋭脱漬債嘖磧蹟績妾接椄絶桟践銭賎祖姐阻咀徂沮柤租砠粗詛造像曽僧憎増噌贈測禹属率損隕殞娘朖踉粮琅浪退袋貸能態熊団断筑恐築張悵脹提堤醍程敵滴摘嫡謫鏑適統銃洞恫桐胴粡銅導徳聴独蝕触任妊衽燃撚彼坡披陂被玻破犯氾判伴片汳阪皈販版鈑巴把杷肥備俵坪秤評貧掃婦武弐複愎腹仏払私弘弁墓防坊彷枋妨紡肪訪留貿恭泰暴矛務夢帛綿錦棉輸諭愉預略領哀異貴遺域延沿鉛革閣割朱株巻看簡厄危机肌飢揮疑扱吸汲供洪拱哄凵凶匈胸郎郷幅勤肋筋警虐劇皇激穴絹権憲源敢厳乎呼呉娯誤后紅江扛杠肛矼訌降岡鋼綱亥刻劾穀骨砂坐座斉済栽裁朿策蚕至視詞誌揃磁捨若樹収宗尤就衆従縦亨享執孰熟屯純鈍沌処署箸著諸緒将傷障城丞烝蒸針什叶仁垂推准惟堆帷椎碓稚雎雉維誰錐盛聖誠宣洗染善奏奉窓創壮装層操燥蔵臓酋尊宅担坦妲怛胆袒探誕段抜援暖媛緩値宙忠庁頂潮賃痛展討唐糖届難浮乳刃忍認納脳悩派扞拝背肺柿俳排徘琲腓緋誹班晩批秘奮並陛甫浦捕哺埔脯補暮宝忘俸捧棒枚幕密盟莫模沢訳匂郵憂優幺幻幼欲翌乱為卯卵監覧裏律奥臨朗仰論沈忱枕狩宏違隠穏閲押呷狎胛岬欧殴箇壊懐該咳垓孩核駭較絞佼括恬聒銛蛞奐換喚煥渙環既卸御況况呪禺隅偶嵎繰噪懆譟躁澡頃項須頓煩碩頼傾携互斜殊巡";
char MPLUS_kanji04[] = "佯祥詳觧析圻听祈斬挿到致遅抽柚袖紬軸岫舳超途秀綉誘銹透般範晋普椚欄暦酔粋砕枠忰伜飾郊握渥依威尉慰壱逸稲芋姻咽陰韻影詠疫謁喝渇褐掲戈戉戍戌鉞越宴煙袁猿堙湮豕遂縁汚凹翁憶臆噫檍乙佳娃哇挂珪桂畦硅袿蛙嫁稼糘寡暇假瑕蝦鍜禍堝蝸鍋華菓蚊紋雅餓峨蛾娥哦俄卑鬼塊傀愧隗槐瑰魄醜魂歓勧尓称弥祢袮珎釈釉蚰呎鈬仆朴訃卦掛耗竓粍繕膳搬俗裕硲峪伍需雷零兼藤佐倚埼猗椅掎碕畸崎騎綺伶怜玲聆蛉鈴渡鍍伊斎阿珂柯呵訶軻垣恒桓菊桑荒柴渋杉衫瀬竜滝槞津塚尾浜梹鋲屈倔掘堀柳聊鉚奄俺淹掩愚昇淫艶凡丹賭匹玄凸缶尽串患杤朽巧甚附柎咐拊坿俣寛薫哲晢誓并瓦瓶隆概慨鬲隔膈載肩房亮柔伸坤呻抻紳楚礎替匿泊岶粕袙珀柏拍狛怕徴雰併垪胼絣辟癖募埋裡狸哩俚浬罔網惘羅絡恪挌珞咯狢烙輅賂駱酪帝楴啼締諦蹄苗猫描錨茨栃梨伎跂岐妓肢阜潟滋鹿縄蝿晃幌滉汕仙圸杣那覇堺岾貼帖砧站粘拈沾鯖棄罫祇舐國毅攻歳齢泡抱砲胞飽鞄冶怡抬詒紿貽胎殆飴駘哨梢硝蛸鞘襄穰溺鰯葛𠮷鮇卍卐昧眛寿漠摸獏膜謨蟆糢抵牴柢砥胝詆岻觝杭坑伉抗吭庖溶熔榕穃鎔睦淕如釦扣皐霜滅薄漏剥曾焦耐剤某煤楳謀媒劣還汎帆枢駆乞吃訖屹乾湿微窒咋柞炸胙詐鮓酢塗曇離促捉振娠汀叮訂釘酊響垳桁裄哘絎擦填槙鎮仇軌孔融拉柆粒竝陥焔伺";
char MPLUS_kanji05[] = "仝乄蜀濁燭獨銑跣鬯鬱虚嘘豸懇墾雇顧渉捗唾捶睡陲錘叱緻沃妖殀亀虎餅龍籠冥慶應智叔督駒鉤枸怐拘狗佝倖澤擇譯繹鐸釋驛淑俶椒濫儖檻襤繿鑑艦遵腐裂顕濃儂膿偏褊蝙諞騙沸佛彿怫拂狒抑枦炉粐舮衡舜瞬緊渓施侵浸震朋崩菱霧雹驚昏婚棔双跡遍尋獲穫蠖敷疲献縣懸繋頻夸桍胯袴跨誇翻膨澎濯擢燿躍掴椢励措惜錯醋偽畜蓄佻挑桃眺跳姚誂銚顛償慌継薦誉鮮貢暫槧寧曼漫慢縵謾鏝鰻幔遷澄燈橙嶝證魅圓麗戯謎僑矯嬌轎驕决抉袂訣淀掟碇綻諚聢錠釧馴唖之企倒偵禎碵幀旁滂傍榜膀謗磅崔催摧僕撲樸璞蹼僚潦撩燎暸瞭鐐繚冠凄淒棲悽褄凍陳棟煉諌錬剌刺剰卓却厘吹坎炊欽軟欣咲朕浚俊悛梭唆竣峻駿賁濆墳噴憤圏湛堪椹糂碪鍖壁壌穣嬢譲醸契奨沙炒抄眇杪妙鈔紗妥嫌謙鎌僖橲嬉鱚寝審𦻙封酎肘紂吋忖岳床庄廃呟弦眩絃舷孤呱柧狐弧觚禅弾褝蝉騨彭彩彰彫彬盾循楯忙虻怒怖慮扇沫抹秣靺拒炬矩距拠荅塔搭鞳摂撃撮樶凝擬礙旋暁杯抔坏柄鞆淇棋稘款没股酘殳尼泥怩昵眤涙捩唳綟啖淡弯湾滑猾榾磆滞漂慓縹嫖鰾驃漸慚潜僣譛瀑爆曝爵儀犠礒艤嶬蟻汪抂枉旺狂狙岨蛆侠挟狭峡猶珍袗殄畛診軫琴宜畳苴悚竦疎辣踈症療盤盲泯眠岷氓琉梳疏硫梗哽粳硬峺碁磨憔樵礁突筒籍粛紛紫累坩拑柑紺鉗蚶甜酣敏繁繊翼碗婉椀蜿腕豌鋺舞衝覆佶桔拮詰";
char MPLUS_kanji06[] = "諾譜貰趣渾暉琿褌諢輝輩迎迫逃逐逓這遇遣曹漕槽糟艚遭避邦邪皓酷杓灼妁釣酌銘酩厨闘憐隣燐鱗紘肱雄露頑頒汰駄掻騒髟髪摩魔麿麻黙庶沓踏鞜啄琢豚舶倣漱悟珸梧唔牾晤潰瞶惺猩腥醒徐畭蜍捜痩戊茂罵拭弑軾捻棯稔唸鯰潼僮憧撞瞳橦幢鐘艟丼臼堋棚弸硼虹缸盍蓋頬麺遮蔽淙棕粽綜踪敖傲戚徹殿摯恣此雌斑脊髄踵腫鍾瘍匁戔箋侍恃峙畤曖瞹憾撼弄奔鴎斥拆泝訴柝奪脅揺瑶謡涌俑桶踊誦蛹鯒衰閑閂鍛緞怠揚楊煬暢暘蝪侮悔晦煮汢吐杜牡肚慈襲懲刈澗潤縛蜴鯣錫賜裼培陪焙賠碚殕噛搾赦崇癒憩勲赫嚇托託辱唇寂賢凉涼掠椋諒鍄鯨堅怪臭惨鯵扉腰脚罰脂詣鮨鎖靴裸踝殻烽峰蜂鋒茎恥垰裃峠鞐虜蛍掌剣傘墨穂藻鶏姫薪鼓浄註駐迅无牟苛仟阡竏粁於洒哂栖晒漆膝枇妣秕粃紕砒稀唏晞鯑捌臺壹瑚楜糊蝴醐肆肄慧彎灣樺嘩曄譁體畝畆藍滄愴搶槍鎗蹌艙斧餌溜瑠榴鰡矣俟埃挨竢拶璃漓玖翡翠慳樫鏗鰹悠梁歪鋪輔鯆舖舗妄喫庇郭梓綾偃堰萱條篠尻腺拇栂姆涕俤悌梯睇圃薮狄荻簗葭湊輳輻蝠剄勁頸攅讃鑚纉雙僵橿彊涯啀睚崕喘揣猯瑞惴湍荘粟随陶掏淘俥陣巫鷺麓塾釜脆詭跪鮠霊鼠楠喃朔厥蕨蒲篭嵩廻猪渚崖倨据裾踞鋸翔羝羚估沽怙枯詁蛄鈷姑鼎寮菅蟹按鮟鞍鑓蓮豪叫糾欺獣戡勘斟尠乏芝剛棡騰逮獄痴冒粧賍洲酬駲塁撤沚址阯祉趾耻佚秩帙";
char MPLUS_kanji07[] = "跌軼儒濡懦孺嬬襦糯臑繻轜蠕幣弊隷潘播燔膰繙幡鐇蟠旙藩逢縫尚杆奸訐軒浙逝很恨垠狠跟菌匠它佗沱柁陀詑鉈駝蛇舵拓柘妬跖鉐鮖淪倫棆崘綸褒帽猛烈葬克膚簿洙珠侏銖誅蛛啓尿芳訟哮酵躰鉢艇婆埴稙殖疾亶壇擅檀羶邸廊傑磔雍擁賊幽恊脇湧羨蹴塞隙闇喉鍵眉珊柵跚刪拳蜜鶴唄爽腎骸嵐挫戴稽玩阮畿窟揉糅蹂鞣撫嘸憮萌悶萎洸恍晄絖胱忽惚膣咾姥蛯濱擯嬪檳殯繽茜偲腮鰓倬悼掉棹啅綽函咨諮洵徇恂絢詢殉璧赴扶趺畉芻雛鷲輙諏陬娵掫箕乖涛陦梼祷畴鋳拙咄柮朏瑳嗟槎搓嵯蹉縒磋謹僅吟衿矜倹侯肯宰嗣愁叙宵窃栓詮塑喪仂朸釛勒勅劫勍迭篤伐閥蛮慕盆胥壻婿痢鼡猟蝋糧侑陏賄鮪畏廉怨芯煎蔑貌勃惧拐枴轄舘綰棺忌躬窮噤襟虞拷栲爾璽嘱堕惰楕隋衷墜痘謄畔妃杞泌稗牌碑罷賓斌賦錻屏塀剖繭庸窯凌陵稜崚楼咢鄂顎鶚勾痕嫉遡遜侶梠絽刹兪喩嗅嘲毀彙慄憬楷揩偕諧羞貪錮凅涸侘咤詫剝眞塡夾頰⽛𠮟睾嚢梱儲啜綴輟錣畷樽噂鱒覗倶溢醤嶋只蘭蘚蘇旭逗扁篇曳洩賽笠笹汐茗萩雫霞垤咥桎姪蛭輊剃鵜茅窪楡嶺耶爺疵磯譏燕閤麟鳩葡禄矮倭洽恰哈袷姶粭蛤夷姦怯鹸垢煽禿叛糞牢幵栞樋哉慷糠鱇凪瀧淵渕桙眸鉾袈裟烏湘蓼蒼嘉旛凰咎屑湟徨隍惶煌鍠蝗鰉窺膏莉楪喋渫諜牒蝶緤鰈郁閃鳳躯樂擽櫟爍礫轢鑠撹剪靭摺佑淳惇椁諄醇敦聡遼肇";
char MPLUS_kanji08[] = "會獪檜繪膾鱠芦磐忤杵斐鷹芭笆邑琶薩苫砺蛎柬揀楝諫鰊楢匝耆黽竈竃壽儔濤擣檮躊鑄疇愕諤鍔鰐婁苓揖楫緝輯蓬瞥碧塙槁犒縞鎬韭韮灘瀞堵槻槌秦榛仗杖宍鮫鞋鮭甑鴻菰苅鴨瑛濾盧蘆枡穎膕幗墟齒齟齬區歐毆甌傴樞嘔嫗謳嶇驅撥獵臘鑞貳栢竡陌粨貊萬寓蓚琥禽擒檎彖掾喙椽櫞萄麹蔗礬澱蛋芒汞樟璋嶂鱆猴峯苑雁賑茸葺癸葵犀贄鶯迂蕉埠粥雀竪嗄榎罹頗頌頷顆瀕丑忸狃紐鈕伽珈跏枷茄迦駕叉寵朧聾爿將漿蒋柊鮗疼疹捲倦拌胖袢絆參滲樛摎膠謬戮戟翰櫂翅單憚箪蒙朦濠壕牽蔓套兒梶遥蕪廣嬰嚶櫻瓔纓庵芹庚湫愀楸啾鍬鰍鞦凧沺佃鈿鶉嶽辿閏菖鐵對醫總气氣來當橡豫與輿晝畫惠斡魁魃菩喞卿漑厩懽灌權讙鑵罐驩俛挽悗娩輓誼俎狼狽賤餞瑾饉褪腿壷壺繍亞啞椏錏媚嵋刄仭扨釼靱籾剱揆墸躇祀截贔屓綬叟搜溲嫂艘涅捏麵麩僉劔斂瞼昂昴頽碍娉聘騁蕊蘂琵葦鮎兜澪兎杏李苺椿鰆橘譎楓颯諷尖牝喧愃暄諠罠鞭淋琳醂獅鰤凋鯛貍鯉豈鎧凱砦些竺黍黎艸轟蕎蒿藁實藝學覺逼苔惹迄贅擧欅襷睿叡泄紲浣皖齋趨惣椛糀喰荏曙宕笥勞撈穢炙廟禀凛挺屠萃鴉霖祓梟冴棠霍莱儚跋扈蠢槭粲燦廠渺緲輌嵒癌痔齊臍倥啌腔椌膵俾睥脾婢裨髀掖腋弛釶馳蔭薗匆怱葱蒔傭慵厭壓靨簒纂竿芥蒜菟蒐荼裔瓢眈耽酖撒繖椥踟蜘螺縲騾蟲蠱塵弩叢輦臥駁譚鐔榊戎絨";
char MPLUS_kanji09[] = "夙彗髭咆枹垉袍炮蚫鉋皰鮑鵞愈肅嘯蕭瀟薔薇隈猥餃饅陷啗諂餡閻薙桧櫛舛桝魯櫓倡猖椙娼掬椈鞠筈渭謂喟蝟訊諺鵬鵠僻檗轍娚甥汝匪匡筐箔篏嵌穿窄芙茉莞蓉蔀蕗董菫埜焚婪梺梦梵儿允弼聲磬謦馨孟殷慇魏巍劉瀏嚠鄭宥肴粂灸鴫悉恕馮憑羈讐蟄蚤痺鵯鵺鵡鴇蔦鳶鴬鴛屍遁奢溌醗攴敲嗜鰭鮒鱈篝聯岱苧斯廛纏躔撰揶椰揄瑜裳嘗竕汾扮吩枌捷睫捺擾祁濔彌禰襖笈筏箭箆簸簾頴頚噸鈎鋤鎚鐙磴荊葎藷蕃蓑蔚蕩薯栴旃樗椴瀘櫨爐臚鑪轤鱸艫驢榔胤杢匙擶嚴巌塘溏瀦潅涜漉轆縺鏈嗹漣迩廼廸絋昿砿俔硯蜆噺吻豹湎緬糎竰侃侭蚯駈耀饗餐畢篳屡贋廓兇樣飮姜亙恆恢穆穐矧孜畋攸收效敘徽歎彪號劃翫猷孕盈楹慾渠禦烹黛轡欝貎猊睨倪喊緘鍼鰔鹹峅翳琺瑯茹鬆涎焉拗狡咬皎蛟駮潴榿皚磑櫃泓瘤糺扎乢軋聚梛圦叺杁幟霹靂熙煕楔曷偈羯竭碣蝎鞨蠍榮澁萠洟姨銕曵從樅縱蹤甕筬籐糒鞴滕縢萓薊數藪螢蟇衾觜邇郛飫餉餘驫幇誣搗靈藹靄弉蠅咫禊做徑脛經輕邊遽痒拿嗚蕾專團爲麒魑魍兩魎鸞攣欒戀哭咒毬毯趙赳紵竚佇俯椨腑聶懾攝囁躡鑷壤攘孃禳讓驤釀泛貶丕胚鉉冦寇衙渤徠涵黜鰺愼槇嗔瞋鎭倆裲輛槿屁穹窈穽甦熾潭溟暝榠瞑幎螟泪泗游滸奎晨晟脩嘴茫棘巒變蠻鑾臠奠擲躑遙糲蠣礪燗繝凜吽儡竄逡槃廢熄杼抒穗滿儉險檢臉嶮驗蕈隘縊謚鎰兌厦";
char MPLUS_kanji10[] = "邱閾霰籌羃祠逞兔冤徊訝崗飄娑倅淬埣悴猝粹碎醉顰蹙稟鑿閧鬨齎靡圀眷蜩綢稠惆痙﨑薀蘊隧拵栫莢躱丨亅亻𠆢刂厶夊尢艹辶辶阝氵扌犭忄毋灬耂礻衤疒罒耒覀𧾷隶⺍躙晰溂喇堯澆撓燒曉橈磽繞鐃嶢蟯驍饒奧礇墺燠懊澳瀋疆浹挾狹陜峽鋏陝⺌⼾⺼氺⺮訁⻗飠⿊𦍌閔憫闌瀾爛襴颪颱厠廁鷽沁濛矇曚檬艨痍筝笙瓏隴熏燻醺冑胄懺懴殲殱孅纖纎讖䜟籤籖嫦蟐祗癇癪涓捐悁狷娟獺爬腱躾絲瑣瞞蹣雜囃箝蕁孚孵屎嚆鄙壜渊碌祿毳橇滌傅溥搏愽榑膊賻饋橄瞰雖澹憺擔檐瞻贍膽蟾譫髙篩眥蚩嗤僂褸樓縷鏤螻傳慱摶槫磚轉囀祕軆禮醴鱧彈嬋襌禪殫戰鄲徭瑤搖謠乘剩卷圈壯莊裝懷壞爭淨崢諍錚靜藏臟帶滯壘疊聽廳兀竟虍虔處笏筍剋尅菎崑箟崙崋惡堊鐚鷭飜昊晏旱捍悍桿稈駻从仄吼祟閖閘闊闍闖闢猜睛蜻皺鄒囮盡儘燼贐賣贊讚鑽瓚璨娜拏儺攤柰悳乭粱岺岑邙玟泮騫勳爀璇繼點鈞懿湜獰僥潛僭譖冪匍匐叭釟嚥臙讌嚼埒夥娶嬲嫐瘴屮彑恙悸慙斃杳暈朮柩棍棗楮檸毫麾沐衍渣熨燵爻艾惱瑙腦瑪媽碼疽疸疱痣痰瘡癬癲盒盥瞠磊窩筵箒紆縋网羮羹耄臀舅艀艱蒟蒻薨藉虱蜃袱褥褻襾訛詈諱讒讀贖續瀆躓辜逅邂邁陋飩饂馭髏髑躅觸鬥鯱鴦鹵麥黹齧齪齷龜龠秭𥝱禸辵沪舒俘剽吝嗇堡塹宸嶼檄歿狆瓊盂祚簪綏羆襞諡輜鍮靼韃韜髷侈佩刎刮劈喀奘孀攀攫櫚瀝燧牆";
char MPLUS_kanji11[] = "盪砌筅篆籃籀縟羲";
char MPLUS_k200401[] = "芦漣逢飴溢茨鰯淫迂厩噂餌襖迦牙廻恢晦蟹葛鞄釜翰翫徽祇汲灸笈卿饗僅喰櫛屑粂祁隙倦捲牽鍵諺巷梗膏鵠甑叉榊薩鯖錆鮫餐杓灼酋楯薯藷哨鞘杖蝕訊逗摺撰煎煽穿箭詮噌遡揃遜腿蛸辿樽歎註瀦捗槌鎚辻挺鄭擢溺兎堵屠賭瀞遁謎灘楢禰牌這秤駁箸叛挽誹樋稗逼謬豹廟瀕斧蔽瞥蔑篇娩鞭庖蓬鱒迄儲餅籾爺鑓愈猷煉簾榔叟咬嘲徘扁橙狡疼竈篝艘芒靱騙鴉甕靄蠅甦棘冤訝腱囀虔祟";

unsigned int g_uiOffset;
unsigned int g_uiIndexLimit;
MPLUS_GlyphsData_t* g_ptGlyphsData;

char style[512];
char d[2048];
char transform[512];

static bool LoadKanaG(xmlTextReaderPtr reader);
static bool LoadKanjiG(xmlTextReaderPtr reader);

static bool ParseSkip(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;

	if(xmlTextReaderIsEmptyElement(reader) == 1)
		return result;

	while(result) {
		ret = xmlTextReaderRead(reader);
		if(ret != 1) {
			if(ret != 0) {
				result = false;
			}
			break;
		}
		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				result = ParseSkip(reader);
				break;
			case XML_READER_TYPE_END_ELEMENT:
				return true;
		}
	}
	return result ;
}

static bool LoadKanaPath(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;
	bool stroke = false;
	double transformx = 0;
	double transformy = 0;

	if(xmlTextReaderIsEmptyElement(reader) == 1) {
	        if(xmlTextReaderMoveToFirstAttribute(reader) == 1) {
			do {
				name = xmlTextReaderConstName(reader);
				value = xmlTextReaderConstValue(reader);
				if(xmlStrcmp(name, "style") == 0) {
					strcpy(style, value);
				} else if(xmlStrcmp(name, "d") == 0) {
					strcpy(d, value);
				} else if(xmlStrcmp(name, "transform") == 0) {
					strcpy(transform, value);
				}
			} while(xmlTextReaderMoveToNextAttribute(reader)==1);
		}
	}

	/* only stroke */
	if(strstr(style, "fill:none;stroke:#000000;")) {
		bool xmode;
		double rate;
		double point;
		unsigned int locate;
		double prex, prey;
		double x, y;
		double x1, y1, x2, y2;
		bool first;
		unsigned int mode, cmode;
		unsigned int index;
		unsigned int kanaindex;

		/* read transform pos */
		locate = 10;
		xmode = true;
		point = false;
		while(transform[locate] != ')') {
			if(transform[locate] >= '0' && transform[locate] <= '9') {
				if(xmode) {
					if(!point) {
						transformx *= 10.0;
						transformx += (transform[locate] - '0');
					} else {
						rate /= 10.0;
						transformx += (transform[locate] - '0') * rate;
					}
				} else {
					if(!point) {
						transformy *= 10.0;
						transformy += (transform[locate] - '0');
					} else {
						rate /= 10.0;
						transformy += (transform[locate] - '0') * rate;
					}
				}
			} else if(transform[locate] == '.') {
				point = true;
				rate = 1.0;
			} else if(transform[locate] == ' ') {
				xmode = false;
				point = false;
			}
			locate++;
		}

		/* search index */
		for(kanaindex = 0; kanaindex < (g_sizKana_pos_size / sizeof(double)) / 2; kanaindex++) {
			if(transformx >= g_pdKana_pos[kanaindex * 2] && transformx < g_pdKana_pos[kanaindex * 2] + 100 && transformy >= g_pdKana_pos[kanaindex * 2 + 1] && transformy < g_pdKana_pos[kanaindex * 2 + 1] + 150) {
				break;
			}
		}
		index = kanaindex + g_uiOffset;

//		if(fmod(transformy + 50, 500) - 50 <= 100) {
			/* culcurate stroke */
			xmode = true;
			point = false;
			first = true;
			mode = 0;
			x = 0;
			y = 0;
			prex = 0;
			prey = 0;
			for(locate = 0; locate < strlen(d); locate++) {
				if(d[locate] == 'M') {
					mode = 1;
					xmode = true;
					point = false;
					x = 0;
					y = 0;
				} else if(d[locate] == 'L') {
					mode = 2;
					xmode = true;
					point = false;
					x = 0;
					y = 0;
				} else if(d[locate] == 'C') {
					mode = 3;
					cmode = 0;
					xmode = true;
					point = false;
					x = 0;
					y = 0;
				} if(d[locate] >= '0' && d[locate] <= '9') {
					if(xmode) {
						if(!point) {
							x *= 10.0;
							x += (d[locate] - '0');
						} else {
							rate /= 10.0;
							x += (d[locate] - '0') * rate;
						}
					} else {
						if(!point) {
							y *= 10.0;
							y += (d[locate] - '0');
						} else {
							rate /= 10.0;
							y += (d[locate] - '0') * rate;
						}
					}
				} else if(d[locate] == '.') {
					point = true;
					rate = 1.0;
				} else if(d[locate] == ' ') {
					switch(mode) {
						case 1:
							if(xmode) {
								xmode = false;
							} else {
								prex = x + transformx - g_pdKana_pos[kanaindex * 2];
								prey = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
								mode = 0;
							}
							break;
						case 2:
							if(xmode) {
								xmode = false;
							} else {
								if(index < g_uiIndexLimit) {
									g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.ItemType = MPLUS_ITEMTYPE_LINE;
									g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.x = prex;
									g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.y = prey;
									g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.x = x + transformx - g_pdKana_pos[kanaindex * 2];
									g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.y = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
									g_ptGlyphsData->glyphs[index].itemscount++;
								}
								prex = x + transformx - g_pdKana_pos[kanaindex * 2];
								prey = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
								mode = 0;
							}
							break;
						case 3:
							switch(cmode) {
								case 0:
									if(xmode) {
										xmode = false;
									} else {
										x1 = x + transformx - g_pdKana_pos[kanaindex * 2];
										y1 = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
										cmode = 1;
										x = 0;
										y = 0;
										xmode = true;
									}
									break;
								case 1:
									if(xmode) {
										xmode = false;
									} else {
										x2 = x + transformx - g_pdKana_pos[kanaindex * 2];
										y2 = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
										cmode = 2;
										x = 0;
										y = 0;
										xmode = true;
									}
									break;
								case 2:
									if(xmode) {
										xmode = false;
									} else {
										if(index < g_uiIndexLimit) {
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.ItemType = MPLUS_ITEMTYPE_CUBIC;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.x = prex;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.y = prey;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.x = x1;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.y = y1;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.x = x2;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.y = y2;
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.x = x + transformx - g_pdKana_pos[kanaindex * 2];
											g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.y = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
											g_ptGlyphsData->glyphs[index].itemscount++;
										}
										prex = x + transformx - g_pdKana_pos[kanaindex * 2];
										prey = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
										mode = 0;
									}
									break;
							}
							break;
					}
					point = false;
				}
			}
			switch(mode) {
				case 2:
					if(index < g_uiIndexLimit) {
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.ItemType = MPLUS_ITEMTYPE_LINE;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.x = prex;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.y = prey;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.x = x + transformx - g_pdKana_pos[kanaindex * 2];
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.y = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
						g_ptGlyphsData->glyphs[index].itemscount++;
					}
					break;
				case 3:
					if(index < g_uiIndexLimit) {
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.ItemType = MPLUS_ITEMTYPE_CUBIC;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.x = prex;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.y = prey;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.x = x1;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.y = y1;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.x = x2;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.y = y2;
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.x = x + transformx - g_pdKana_pos[kanaindex * 2];
						g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.y = y + transformy - g_pdKana_pos[kanaindex * 2 + 1];
						g_ptGlyphsData->glyphs[index].itemscount++;
					}
					break;
			}
		}
//	}

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "g") == 0) {
					result = LoadKanaG(reader);
				} else if(xmlStrcmp(name, "path") == 0) {
					result = LoadKanaPath(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	return result;
}

static bool LoadKanaG(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;

	if(xmlTextReaderIsEmptyElement(reader) == 1)
		return result;

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "g") == 0) {
					result = LoadKanaG(reader);
				} else if(xmlStrcmp(name, "path") == 0) {
					result = LoadKanaPath(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	return result;
}

static bool LoadKanaSVG(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;

	if(xmlTextReaderIsEmptyElement(reader) == 1)
		return result;

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "g") == 0) {
					result = LoadKanaG(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	return result;
}

void LoadKanaFile(const char* i_strFilename) {
	bool result = true;
	xmlTextReaderPtr reader;
	const xmlChar *name;
	int ret;

	reader = xmlReaderForFile(i_strFilename, NULL, 0) ;
	if(reader == NULL) {
		return;
	}

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "svg") == 0) {
					result = LoadKanaSVG(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	xmlFreeTextReader(reader) ;
}

static bool LoadKanjiPath(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;
	bool stroke = false;
	double transformx = 0;
	double transformy = 0;

	if(xmlTextReaderIsEmptyElement(reader) == 1) {
	        if(xmlTextReaderMoveToFirstAttribute(reader) == 1) {
			do {
				name = xmlTextReaderConstName(reader);
				value = xmlTextReaderConstValue(reader);
				if(xmlStrcmp(name, "style") == 0) {
					strcpy(style, value);
				} else if(xmlStrcmp(name, "d") == 0) {
					strcpy(d, value);
				} else if(xmlStrcmp(name, "transform") == 0) {
					strcpy(transform, value);
				}
			} while(xmlTextReaderMoveToNextAttribute(reader)==1);
		}
	}

	/* only stroke */
	if(strstr(style, "fill:none;stroke:#000000;")) {
		bool xmode;
		double rate;
		double point;
		unsigned int locate;
		double prex, prey;
		double x, y;
		double x1, y1, x2, y2;
		bool first;
		unsigned int mode, cmode;
		unsigned int index;

		/* read transform pos */
		locate = 10;
		xmode = true;
		point = false;
		while(transform[locate] != ')') {
			if(transform[locate] >= '0' && transform[locate] <= '9') {
				if(xmode) {
					if(!point) {
						transformx *= 10.0;
						transformx += (transform[locate] - '0');
					} else {
						rate /= 10.0;
						transformx += (transform[locate] - '0') * rate;
					}
				} else {
					if(!point) {
						transformy *= 10.0;
						transformy += (transform[locate] - '0');
					} else {
						rate /= 10.0;
						transformy += (transform[locate] - '0') * rate;
					}
				}
			} else if(transform[locate] == '.') {
				point = true;
				rate = 1.0;
			} else if(transform[locate] == ' ') {
				xmode = false;
				point = false;
			}
			locate++;
		}

		if(MPLUS_for11 == 0) {
			if(fmod(transformy + 50, 500) - 50 <= 100) {
				/* culcurate stroke */
				xmode = true;
				point = false;
				first = true;
				mode = 0;
				x = 0;
				y = 0;
				prex = 0;
				prey = 0;
				for(locate = 0; locate < strlen(d); locate++) {
					if(d[locate] == 'M') {
						mode = 1;
						xmode = true;
						point = false;
						x = 0;
						y = 0;
					} else if(d[locate] == 'L') {
						mode = 2;
						xmode = true;
						point = false;
						x = 0;
						y = 0;
					} else if(d[locate] == 'C') {
						mode = 3;
						cmode = 0;
						xmode = true;
						point = false;
						x = 0;
						y = 0;
					} if(d[locate] >= '0' && d[locate] <= '9') {
						if(xmode) {
							if(!point) {
								x *= 10.0;
								x += (d[locate] - '0');
							} else {
								rate /= 10.0;
								x += (d[locate] - '0') * rate;
							}
						} else {
							if(!point) {
								y *= 10.0;
								y += (d[locate] - '0');
							} else {
								rate /= 10.0;
								y += (d[locate] - '0') * rate;
							}
						}
					} else if(d[locate] == '.') {
						point = true;
						rate = 1.0;
					} else if(d[locate] == ' ') {
						switch(mode) {
							case 1:
								if(xmode) {
									xmode = false;
								} else {
									prex = fmod(x + transformx, 100);
									prey = fmod(y + transformy + 50, 500) - 50;
									mode = 0;
								}
								break;
							case 2:
								if(xmode) {
									xmode = false;
								} else {
									index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
									if(index < g_uiIndexLimit) {
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.ItemType = MPLUS_ITEMTYPE_LINE;
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.x = prex;
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.y = prey;
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.x = fmod(x + transformx, 100);
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.y = fmod(y + transformy + 50, 500) - 50;
										g_ptGlyphsData->glyphs[index].itemscount++;
									}
									prex = fmod(x + transformx, 100);
									prey = fmod(y + transformy + 50, 500) - 50;
									mode = 0;
								}
								break;
							case 3:
								switch(cmode) {
									case 0:
										if(xmode) {
											xmode = false;
										} else {
											x1 = fmod(x + transformx, 100);
											y1 = fmod(y + transformy + 50, 500) - 50;
											cmode = 1;
											x = 0;
											y = 0;
											xmode = true;
										}
										break;
									case 1:
										if(xmode) {
											xmode = false;
										} else {
											x2 = fmod(x + transformx, 100);
											y2 = fmod(y + transformy + 50, 500) - 50;
											cmode = 2;
											x = 0;
											y = 0;
											xmode = true;
										}
										break;
									case 2:
										if(xmode) {
											xmode = false;
										} else {
											index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
											if(index < g_uiIndexLimit) {
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.ItemType = MPLUS_ITEMTYPE_CUBIC;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.x = prex;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.y = prey;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.x = x1;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.y = y1;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.x = x2;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.y = y2;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.x = fmod(x + transformx, 100);
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.y = fmod(y + transformy + 50, 500) - 50;
												g_ptGlyphsData->glyphs[index].itemscount++;
											}
											prex = fmod(x + transformx, 100);
											prey = fmod(y + transformy + 50, 500) - 50;
											mode = 0;
										}
										break;
								}
								break;
						}
						point = false;
					}
				}
				switch(mode) {
					case 2:
						index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
						if(index < g_uiIndexLimit) {
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.ItemType = MPLUS_ITEMTYPE_LINE;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.x = prex;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.y = prey;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.x = fmod(x + transformx, 100);
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.y = fmod(y + transformy + 50, 500) - 50;
							g_ptGlyphsData->glyphs[index].itemscount++;
						}
						break;
					case 3:
						index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
						if(index < g_uiIndexLimit) {
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.ItemType = MPLUS_ITEMTYPE_CUBIC;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.x = prex;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.y = prey;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.x = x1;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.y = y1;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.x = x2;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.y = y2;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.x = fmod(x + transformx, 100);
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.y = fmod(y + transformy + 50, 500) - 50;
							g_ptGlyphsData->glyphs[index].itemscount++;
						}
						break;
				}
			}
		} else {
			if(fmod(transformy + 50, 500) - 50 <= 200) {
				/* culcurate stroke */
				xmode = true;
				point = false;
				first = true;
				mode = 0;
				x = 0;
				y = 0;
				prex = 0;
				prey = 0;
				for(locate = 0; locate < strlen(d); locate++) {
					if(d[locate] == 'M') {
						mode = 1;
						xmode = true;
						point = false;
						x = 0;
						y = 0;
					} else if(d[locate] == 'L') {
						mode = 2;
						xmode = true;
						point = false;
						x = 0;
						y = 0;
					} else if(d[locate] == 'C') {
						mode = 3;
						cmode = 0;
						xmode = true;
						point = false;
						x = 0;
						y = 0;
					} if(d[locate] >= '0' && d[locate] <= '9') {
						if(xmode) {
							if(!point) {
								x *= 10.0;
								x += (d[locate] - '0');
							} else {
								rate /= 10.0;
								x += (d[locate] - '0') * rate;
							}
						} else {
							if(!point) {
								y *= 10.0;
								y += (d[locate] - '0');
							} else {
								rate /= 10.0;
								y += (d[locate] - '0') * rate;
							}
						}
					} else if(d[locate] == '.') {
						point = true;
						rate = 1.0;
					} else if(d[locate] == ' ') {
						switch(mode) {
							case 1:
								if(xmode) {
									xmode = false;
								} else {
									prex = fmod(x + transformx, 100);
									prey = fmod(y + transformy + 50, 500) - 142;
									mode = 0;
								}
								break;
							case 2:
								if(xmode) {
									xmode = false;
								} else {
									index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
									if(index < g_uiIndexLimit) {
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.ItemType = MPLUS_ITEMTYPE_LINE;
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.x = prex;
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.y = prey;
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.x = fmod(x + transformx, 100);
										g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.y = fmod(y + transformy + 50, 500) - 142;
										g_ptGlyphsData->glyphs[index].itemscount++;
									}
									prex = fmod(x + transformx, 100);
									prey = fmod(y + transformy + 50, 500) - 142;
									mode = 0;
								}
								break;
							case 3:
								switch(cmode) {
									case 0:
										if(xmode) {
											xmode = false;
										} else {
											x1 = fmod(x + transformx, 100);
											y1 = fmod(y + transformy + 50, 500) - 142;
											cmode = 1;
											x = 0;
											y = 0;
											xmode = true;
										}
										break;
									case 1:
										if(xmode) {
											xmode = false;
										} else {
											x2 = fmod(x + transformx, 100);
											y2 = fmod(y + transformy + 50, 500) - 142;
											cmode = 2;
											x = 0;
											y = 0;
											xmode = true;
										}
										break;
									case 2:
										if(xmode) {
											xmode = false;
										} else {
											index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
											if(index < g_uiIndexLimit) {
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.ItemType = MPLUS_ITEMTYPE_CUBIC;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.x = prex;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.y = prey;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.x = x1;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.y = y1;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.x = x2;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.y = y2;
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.x = fmod(x + transformx, 100);
												g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.y = fmod(y + transformy + 50, 500) - 142;
												g_ptGlyphsData->glyphs[index].itemscount++;
											}
											prex = fmod(x + transformx, 100);
											prey = fmod(y + transformy + 50, 500) - 142;
											mode = 0;
										}
										break;
								}
								break;
						}
						point = false;
					}
				}
				switch(mode) {
					case 2:
						index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
						if(index < g_uiIndexLimit) {
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.ItemType = MPLUS_ITEMTYPE_LINE;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.x = prex;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos1.y = prey;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.x = fmod(x + transformx, 100);
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].line.pos2.y = fmod(y + transformy + 50, 500) - 142;
							g_ptGlyphsData->glyphs[index].itemscount++;
						}
						break;
					case 3:
						index = (((unsigned int)transformy + 50) / 500) * 50 + (unsigned int)transformx / 100 + g_uiOffset;
						if(index < g_uiIndexLimit) {
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.ItemType = MPLUS_ITEMTYPE_CUBIC;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.x = prex;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos1.y = prey;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.x = x1;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos2.y = y1;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.x = x2;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos3.y = y2;
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.x = fmod(x + transformx, 100);
							g_ptGlyphsData->glyphs[index].items[g_ptGlyphsData->glyphs[index].itemscount].cubic.pos4.y = fmod(y + transformy + 50, 500) - 142;
							g_ptGlyphsData->glyphs[index].itemscount++;
						}
						break;
				}
			}
		}
	}

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "g") == 0) {
					result = LoadKanjiG(reader);
				} else if(xmlStrcmp(name, "path") == 0) {
					result = LoadKanjiPath(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	return result;
}

static bool LoadKanjiG(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;

	if(xmlTextReaderIsEmptyElement(reader) == 1)
		return result;

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "g") == 0) {
					result = LoadKanjiG(reader);
				} else if(xmlStrcmp(name, "path") == 0) {
					result = LoadKanjiPath(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	return result;
}

static bool LoadKanjiSVG(xmlTextReaderPtr reader) {
	const xmlChar *name;
	const xmlChar *value;
	bool result = true;
	int ret;

	if(xmlTextReaderIsEmptyElement(reader) == 1)
		return result;

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "g") == 0) {
					result = LoadKanjiG(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	return result;
}

void LoadKanjiFile(const char* i_strFilename) {
	bool result = true;
	xmlTextReaderPtr reader;
	const xmlChar *name;
	int ret;

	reader = xmlReaderForFile(i_strFilename, NULL, 0) ;
	if(reader == NULL) {
		return;
	}

	while(result) {
		ret = xmlTextReaderRead(reader);
	        if(ret != 1) {
			if(ret != 0) {
				result = false ;
			}
			break;
		}

		switch(xmlTextReaderNodeType(reader)) {
			case XML_READER_TYPE_ELEMENT:
				name = xmlTextReaderConstName(reader);
				if(xmlStrcmp(name, "svg") == 0) {
					result = LoadKanjiSVG(reader);
				} else {
					result = ParseSkip(reader);
				}
				break ;
		}
	}

	xmlFreeTextReader(reader) ;
}

void LoadMPLUSStroke(MPLUS_GlyphsData_t* o_ptGlyphsData) {
	unsigned int uiIndex;
	unsigned int uiCode;
	char strUTF16[4];
	size_t sizPreInputSize;
	size_t sizInputSize;
	size_t sizOutputSize;
	char* ptStart;
	char* ptHead;
	char* ptOutput;
	iconv_t cd;
	unsigned int uiBOM;

	LIBXML_TEST_VERSION

	g_ptGlyphsData = o_ptGlyphsData;

	/* code */
	g_pdKana_pos = MPLUS_hg1_pos;
	g_sizKana_pos_size = sizeof(MPLUS_hg1_pos);
	ptStart = MPLUS_hg1;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 0;
	g_uiIndexLimit = 84;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 84; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanaFile("./mplus_hg1_glyphs.svg");
	g_ptGlyphsData->glyphscount += 84;

	/* code */
	g_pdKana_pos = MPLUS_kk1_pos;
	g_sizKana_pos_size = sizeof(MPLUS_kk1_pos);
	ptStart = MPLUS_kk1;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 84;
	g_uiIndexLimit = 231;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 147; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanaFile("./mplus_kk1_glyphs.svg");
	g_ptGlyphsData->glyphscount += 147;

	/* code */
	ptStart = MPLUS_kanji01;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 231;
	g_uiIndexLimit = 731;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-01.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji02;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 731;
	g_uiIndexLimit = 1231;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-02.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji03;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 1231;
	g_uiIndexLimit = 1731;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-03.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji04;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 1731;
	g_uiIndexLimit = 2231;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 5;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-04.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji05;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 2231;
	g_uiIndexLimit = 2731;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-05.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji06;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 2731;
	g_uiIndexLimit = 3231;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-06.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji07;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 3231;
	g_uiIndexLimit = 3731;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-07.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji08;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 3731;
	g_uiIndexLimit = 4231;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-08.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji09;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 4231;
	g_uiIndexLimit = 4731;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-09.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji10;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 4731;
	g_uiIndexLimit = 5231;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 500; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 4;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./kanji-10.svg");
	g_ptGlyphsData->glyphscount += 500;

	/* code */
	ptStart = MPLUS_kanji11;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 5231;
	g_uiIndexLimit = 5239;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 8; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 4;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	MPLUS_for11 = 1;
	LoadKanjiFile("./kanji-11.svg");
	MPLUS_for11 = 0;
	g_ptGlyphsData->glyphscount += 8;

	/* code */
	ptStart = MPLUS_k200401;
	cd = iconv_open("UTF-16","UTF-8");
	g_uiOffset = 5239;
	g_uiIndexLimit = 5404;
	uiBOM = 1;
	for(uiIndex = 0; uiIndex < 165; uiIndex++) {
		ptHead = ptStart;
		ptOutput = strUTF16;
		if(uiBOM) {
			sizOutputSize = 4;
		} else {
			sizOutputSize = 2;
		}
		sizInputSize = 3;
		iconv(cd, &ptHead, &sizInputSize, &ptOutput, &sizOutputSize);
		/* UTF-8 */
		if((unsigned char)(ptStart[0]) >= 0xF0 && (unsigned char)(ptStart[0]) <= 0xF7) {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 24;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[3] & 0xFF);
			if(uiBOM && sizOutputSize == 4 || !uiBOM && sizOutputSize == 2) {
				ptHead += 4;
			}
		} else {
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8  = (ptStart[0] & 0xFF) << 16;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[1] & 0xFF) << 8;
			g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code8 += (ptStart[2] & 0xFF);
		}
		/* UTF-16 */
		if(uiBOM) {
			if(sizOutputSize == 4) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				/* ignore BOM */
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[2] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[3] & 0xFF) << 8;
			}
		} else {
			if(sizOutputSize == 2) {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code = 0;
			} else {
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code  = (strUTF16[0] & 0xFF);
				g_ptGlyphsData->glyphs[uiIndex + g_uiOffset].code += (strUTF16[1] & 0xFF) << 8;
			}
		}
		ptStart = ptHead;
		uiBOM = 0;
	}
	iconv_close(cd);
	/* data */
	LoadKanjiFile("./k2004-01.svg");
	g_ptGlyphsData->glyphscount += 165;
}

