2011-06-19 15:21:30 +09:00
|
|
|
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
|
|
|
|
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
|
|
|
|
2011-07-06 15:06:45 +09:00
|
|
|
'use strict';
|
2011-06-19 15:21:30 +09:00
|
|
|
|
2011-06-09 09:37:06 +09:00
|
|
|
var CFFEncodingMap = {
|
2011-07-06 15:06:45 +09:00
|
|
|
'0': '-reserved-',
|
|
|
|
'1': 'hstem',
|
|
|
|
'2': '-reserved-',
|
|
|
|
'3': 'vstem',
|
|
|
|
'4': 'vmoveto',
|
|
|
|
'5': 'rlineto',
|
|
|
|
'6': 'hlineto',
|
|
|
|
'7': 'vlineto',
|
|
|
|
'8': 'rrcurveto',
|
|
|
|
'9': '-reserved-',
|
|
|
|
'10': 'callsubr',
|
|
|
|
'11': 'return',
|
|
|
|
'12': {
|
|
|
|
'3': 'and',
|
|
|
|
'4': 'or',
|
|
|
|
'5': 'not',
|
|
|
|
'9': 'abs',
|
|
|
|
'10': 'add',
|
|
|
|
'11': 'div',
|
|
|
|
'12': 'sub',
|
|
|
|
'14': 'neg',
|
|
|
|
'15': 'eq',
|
|
|
|
'18': 'drop',
|
|
|
|
'20': 'put',
|
|
|
|
'21': 'get',
|
|
|
|
'22': 'ifelse',
|
|
|
|
'23': 'random',
|
|
|
|
'24': 'mul',
|
|
|
|
'26': 'sqrt',
|
|
|
|
'27': 'dup',
|
|
|
|
'28': 'exch',
|
|
|
|
'29': 'index',
|
|
|
|
'30': 'roll',
|
|
|
|
'34': 'hflex',
|
|
|
|
'35': 'flex',
|
|
|
|
'36': 'hflex1',
|
|
|
|
'37': 'flex1'
|
2011-06-09 09:37:06 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'13': '-reserved-',
|
|
|
|
'14': 'endchar',
|
|
|
|
'15': '-reserved-',
|
|
|
|
'16': '-reserved-',
|
|
|
|
'17': '-reserved-',
|
|
|
|
'18': 'hstemhm',
|
|
|
|
'19': 'hintmask',
|
|
|
|
'20': 'cntrmask',
|
|
|
|
'21': 'rmoveto',
|
|
|
|
'22': 'hmoveto',
|
|
|
|
'23': 'vstemhm',
|
|
|
|
'24': 'rcurveline',
|
|
|
|
'25': 'rlivecurve',
|
|
|
|
'26': 'vvcurveto',
|
|
|
|
'27': 'hhcurveto',
|
|
|
|
'29': 'callgsubr',
|
|
|
|
'30': 'vhcurveto',
|
|
|
|
'31': 'hvcurveto'
|
2011-06-09 09:37:06 +09:00
|
|
|
};
|
|
|
|
|
|
|
|
var CFFDictDataMap = {
|
2011-07-06 15:06:45 +09:00
|
|
|
'0': {
|
|
|
|
name: 'version',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'1': {
|
|
|
|
name: 'Notice',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'2': {
|
|
|
|
name: 'FullName',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'3': {
|
|
|
|
name: 'FamilyName',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'4': {
|
|
|
|
name: 'Weight',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'5': {
|
|
|
|
name: 'FontBBox',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: [0, 0, 0, 0]
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'6': {
|
|
|
|
name: 'BlueValues'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'7': {
|
|
|
|
name: 'OtherBlues'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'8': {
|
|
|
|
name: 'FamilyBlues'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'9': {
|
|
|
|
name: 'FamilyOtherBlues'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'10': {
|
|
|
|
name: 'StdHW'
|
2011-06-19 15:21:30 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'11': {
|
|
|
|
name: 'StdVW'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'12': {
|
|
|
|
'0': {
|
|
|
|
name: 'Copyright',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'1': {
|
|
|
|
name: 'IsFixedPitch',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: false
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'2': {
|
|
|
|
name: 'ItalicAngle',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'3': {
|
|
|
|
name: 'UnderlinePosition',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: -100
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'4': {
|
|
|
|
name: 'UnderlineThickness',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 50
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'5': {
|
|
|
|
name: 'PaintType',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'6': {
|
|
|
|
name: 'CharstringType',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 2
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'7': {
|
|
|
|
name: 'FontMatrix',
|
|
|
|
operand: [0.001, 0, 0, 0.001, 0 , 0]
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'8': {
|
|
|
|
name: 'StrokeWidth',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'9': {
|
|
|
|
name: 'BlueScale'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'10': {
|
|
|
|
name: 'BlueShift'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'11': {
|
|
|
|
name: 'BlueFuzz'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'12': {
|
|
|
|
name: 'StemSnapH'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'13': {
|
|
|
|
name: 'StemSnapV'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'14': {
|
|
|
|
name: 'ForceBold'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'17': {
|
|
|
|
name: 'LanguageGroup'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'18': {
|
|
|
|
name: 'ExpansionFactor'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-09-11 22:23:35 +09:00
|
|
|
'19': {
|
2011-07-06 15:06:45 +09:00
|
|
|
name: 'initialRandomSeed'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'20': {
|
|
|
|
name: 'SyntheticBase',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: null
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'21': {
|
|
|
|
name: 'PostScript',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'22': {
|
|
|
|
name: 'BaseFontName',
|
|
|
|
operand: 'SID'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'23': {
|
|
|
|
name: 'BaseFontBlend',
|
|
|
|
operand: 'delta'
|
2011-06-09 00:26:29 +09:00
|
|
|
}
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'13': {
|
|
|
|
name: 'UniqueID',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: null
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'14': {
|
|
|
|
name: 'XUID',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: []
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'15': {
|
|
|
|
name: 'charset',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'16': {
|
|
|
|
name: 'Encoding',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'17': {
|
|
|
|
name: 'CharStrings',
|
2011-06-09 00:26:29 +09:00
|
|
|
operand: null
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'18': {
|
|
|
|
name: 'Private',
|
|
|
|
operand: 'number number'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'19': {
|
|
|
|
name: 'Subrs'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'20': {
|
|
|
|
name: 'defaultWidthX'
|
2011-06-09 00:26:29 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'21': {
|
|
|
|
name: 'nominalWidthX'
|
2011-06-09 00:26:29 +09:00
|
|
|
}
|
|
|
|
};
|
2011-06-09 03:37:25 +09:00
|
|
|
|
2011-06-09 09:37:06 +09:00
|
|
|
var CFFDictPrivateDataMap = {
|
2011-07-06 15:06:45 +09:00
|
|
|
'6': {
|
|
|
|
name: 'BluesValues',
|
|
|
|
operand: 'delta'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'7': {
|
|
|
|
name: 'OtherBlues',
|
|
|
|
operand: 'delta'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'8': {
|
|
|
|
name: 'FamilyBlues',
|
|
|
|
operand: 'delta'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'9': {
|
|
|
|
name: 'FamilyOtherBlues',
|
|
|
|
operand: 'delta'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'10': {
|
|
|
|
name: 'StdHW',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: null
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'11': {
|
|
|
|
name: 'StdVW',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: null
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'12': {
|
|
|
|
'9': {
|
|
|
|
name: 'BlueScale',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 0.039625
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'10': {
|
|
|
|
name: 'BlueShift',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 7
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'11': {
|
|
|
|
name: 'BlueFuzz',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 1
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'12': {
|
|
|
|
name: 'StemSnapH',
|
|
|
|
operand: 'delta'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'13': {
|
|
|
|
name: 'StemSnapV',
|
|
|
|
operand: 'delta'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'14': {
|
|
|
|
name: 'ForceBold',
|
|
|
|
operand: 'boolean'
|
2011-06-09 07:26:41 +09:00
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'17': {
|
|
|
|
name: 'LanguageGroup',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'18': {
|
|
|
|
name: 'ExpansionFactor',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 0.06
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'19': {
|
|
|
|
name: 'initialRandomSeed',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 0
|
|
|
|
}
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'19': {
|
|
|
|
name: 'Subrs',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: null
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'20': {
|
|
|
|
name: 'defaultWidthX',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 0
|
|
|
|
},
|
2011-07-06 15:06:45 +09:00
|
|
|
'21': {
|
|
|
|
name: 'nominalWidthX',
|
2011-06-09 07:26:41 +09:00
|
|
|
operand: 0
|
|
|
|
}
|
|
|
|
};
|
2011-06-13 12:30:02 +09:00
|
|
|
|