From: notmasteryet Date: Thu, 22 Sep 2011 01:00:35 +0000 (-0500) Subject: Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into tree-22 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ed21c8590caf378eeb5d4424973569a4987287e4;p=pdf.js.git Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into tree-22 Conflicts: pdf.js --- ed21c8590caf378eeb5d4424973569a4987287e4 diff --cc pdf.js index 7e56c30,ac58ec0..f6f4a3b --- a/pdf.js +++ b/pdf.js @@@ -4483,33 -4490,8 +4490,34 @@@ var PartialEvaluator = (function partia return glyphs; }, + 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(dict, xref, resources) { + translateFont: function partialEvaluatorTranslateFont(dict, xref, + resources) { var baseDict = dict; var type = dict.get('Subtype'); assertWellFormed(IsName(type), 'invalid font Subtype');