1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Merge pull request #3195 from yurydelendik/no-filltext

Drawing without fillText; refactoring ADD_TO_PATH
This commit is contained in:
Brendan Dahl 2013-05-21 16:53:42 -07:00
commit efde079417
7 changed files with 812 additions and 100 deletions

View file

@ -17,7 +17,8 @@
/* globals assert, bytesToString, CIDToUnicodeMaps, error, ExpertCharset,
ExpertSubsetCharset, FileReaderSync, globalScope, GlyphsUnicode,
info, isArray, isNum, ISOAdobeCharset, isWorker, PDFJS, Stream,
stringToBytes, TextDecoder, TODO, warn, Lexer, Util */
stringToBytes, TextDecoder, TODO, warn, Lexer, Util, shadow,
FontRendererFactory */
'use strict';
@ -40,6 +41,8 @@ var SEAC_ANALYSIS_ENABLED = false;
var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];
PDFJS.disableFontFace = false;
var FontFlags = {
FixedPitch: 1,
Serif: 2,
@ -3019,6 +3022,11 @@ var Font = (function FontClosure() {
mimetype: null,
encoding: null,
get renderer() {
var renderer = FontRendererFactory.create(this);
return shadow(this, 'renderer', renderer);
},
exportData: function Font_exportData() {
var data = {};
for (var i in this) {
@ -4568,6 +4576,11 @@ var Font = (function FontClosure() {
if (!this.data)
return null;
if (PDFJS.disableFontFace) {
this.disableFontFace = true;
return null;
}
var data = bytesToString(this.data);
var fontName = this.loadedName;