1
0
Fork 0
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:
Vivien Nicolas 2011-06-14 21:38:59 +02:00
parent 6364e7fad5
commit bd2e756100
3 changed files with 64 additions and 43 deletions

View file

@ -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.
*/