mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Add XObjects fonts to the list of page fonts and has a forEach method to the Dict class
This commit is contained in:
parent
6364e7fad5
commit
bd2e756100
3 changed files with 64 additions and 43 deletions
13
PDFFont.js
13
PDFFont.js
|
@ -580,9 +580,22 @@ var FontsUtils = {
|
|||
* and valid in the point of view of the sanitizer.
|
||||
*/
|
||||
var TrueType = function(aFile) {
|
||||
var header = this._readOpenTypeHeader(aFile);
|
||||
this.data = aFile;
|
||||
};
|
||||
|
||||
TrueType.prototype = {
|
||||
_readOpenTypeHeader: function(aFile) {
|
||||
return {
|
||||
version: aFile.getBytes(4),
|
||||
numTables: FontsUtils.bytesToInteger(aFile.getBytes(2)),
|
||||
searchRange: FontsUtils.bytesToInteger(aFile.getBytes(2)),
|
||||
entrySelector: FontsUtils.bytesToInteger(aFile.getBytes(2)),
|
||||
rangeShift: FontsUtils.bytesToInteger(aFile.getBytes(2))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* This dictionary holds decoded fonts data.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue