}
function shadow(obj, prop, value) {
- Object.defineProperty(obj, prop, { value: value,
- enumerable: true,
- configurable: true,
- writable: false });
- return value;
+ try {
+ Object.defineProperty(obj, prop, { value: value,
+ enumerable: true,
+ configurable: true,
+ writable: false });
+ } catch(e) {
+ obj.__defineGetter__(prop, function() {
+ return value;
+ });
+ }
+ return value;
}
function bytesToString(bytes) {
case 'Type1':
baseEncoding = Encodings.StandardEncoding.slice();
break;
+ case 'Type3':
+ // There is no baseEncoding for a Type3 font, the 'Encoding'
+ // entry is required and should provide a complete encoding
+ break;
default:
warn('Unknown type of font: ' + fontType);
break;
glyphsMap[glyph] = encodingMap[i] = GlyphsUnicode[glyph] || i;
}
+
+ if (fontType == 'Type3')
+ log(glyphsMap);
+
if (fontType == 'TrueType' && fontDict.has('ToUnicode') && differences) {
var cmapObj = xref.fetchIfRef(fontDict.get('ToUnicode'));
if (IsName(cmapObj)) {