mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Enforces trailing spaces
This commit is contained in:
parent
ba87d2fe11
commit
3461d02d05
6 changed files with 12 additions and 11 deletions
|
@ -196,7 +196,7 @@ function compileType3Glyph(imgData) {
|
|||
var width = imgData.width, height = imgData.height;
|
||||
var i, j, j0, width1 = width + 1;
|
||||
var points = new Uint8Array(width1 * (height + 1));
|
||||
var POINT_TYPES =
|
||||
var POINT_TYPES =
|
||||
new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
|
||||
// finding iteresting points: every point is located between mask pixels,
|
||||
// so there will be points of the (width + 1)x(height + 1) grid. Every point
|
||||
|
@ -237,7 +237,7 @@ function compileType3Glyph(imgData) {
|
|||
for (j = 1; j < width; j++) {
|
||||
sum = (sum >> 2) + (data[pos + 4] ? 4 : 0) +
|
||||
(data[pos - lineSize + 4] ? 8 : 0);
|
||||
if (POINT_TYPES[sum]) {
|
||||
if (POINT_TYPES[sum]) {
|
||||
points[j0 + j] = POINT_TYPES[sum];
|
||||
++count;
|
||||
}
|
||||
|
@ -293,16 +293,16 @@ function compileType3Glyph(imgData) {
|
|||
do {
|
||||
var step = steps[type];
|
||||
do { p += step; } while (!points[p]);
|
||||
|
||||
|
||||
pp = points[p];
|
||||
if (pp !== 5 && pp !== 10) {
|
||||
// set new direction
|
||||
type = pp;
|
||||
type = pp;
|
||||
// delete mark
|
||||
points[p] = 0;
|
||||
points[p] = 0;
|
||||
} else { // type is 5 or 10, ie, a crossing
|
||||
// set new direction
|
||||
type = pp & ((0x33 * type) >> 4);
|
||||
type = pp & ((0x33 * type) >> 4);
|
||||
// set new type for "future hit"
|
||||
points[p] &= (type >> 2 | type << 2);
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ function compileType3Glyph(imgData) {
|
|||
c.beginPath();
|
||||
c.restore();
|
||||
};
|
||||
|
||||
|
||||
return drawOutline;
|
||||
}
|
||||
|
||||
|
|
|
@ -562,7 +562,7 @@ var DeviceCmykCS = (function DeviceCmykCSClosure() {
|
|||
131.35250912493976 * k - 190.9453302588951) +
|
||||
y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) +
|
||||
k * (-20.737325471181034 * k - 187.80453709719578) + 255;
|
||||
var b =
|
||||
var b =
|
||||
c * (0.8842522430003296 * c + 8.078677503112928 * m +
|
||||
30.89978309703729 * y - 0.23883238689178934 * k +
|
||||
-14.183576799673286) +
|
||||
|
|
|
@ -2676,7 +2676,7 @@ var Font = (function FontClosure() {
|
|||
if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) {
|
||||
ranges[i][1] = 0xFFFE;
|
||||
}
|
||||
var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
|
||||
var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0;
|
||||
var segCount = bmpLength + trailingRangesCount;
|
||||
var segCount2 = segCount * 2;
|
||||
var searchRange = getMaxPower2(segCount) * 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue