return glyphs;
},
- translateFont: function(dict, xref, resources) {
+ getBaseFontMetrics: function(baseFontName) {
+ var map = {};
+ if (/^Symbol(-?(Bold|Italic))*$/.test(baseFontName)) {
+ // special case for symbols
+ var encoding = Encodings.symbolsEncoding;
+ for (var i = 0, n = encoding.length, j; i < n; i++) {
+ if (!(j = encoding[i]))
+ continue;
+ map[i] = GlyphsUnicode[j] || 0;
+ }
+ }
+
+ var defaultWidth = 0;
+ var widths = Metrics[stdFontMap[baseFontName] || baseFontName];
+ if (IsNum(widths)) {
+ defaultWidth = widths;
+ widths = null;
+ }
+
+ return {
+ defaultWidth: defaultWidth,
+ widths: widths || [],
+ map: map
+ };
+ },
+
+ translateFont: function partialEvaluatorTranslateFont(dict, xref,
+ resources) {
var baseDict = dict;
var type = dict.get('Subtype');
assertWellFormed(IsName(type), 'invalid font Subtype');