mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Build the text layer geometry on the worker.
This commit is contained in:
parent
af536353d5
commit
5bd8a83c9b
10 changed files with 404 additions and 416 deletions
|
@ -2102,23 +2102,6 @@ function reverseIfRtl(chars) {
|
|||
return s;
|
||||
}
|
||||
|
||||
function fontCharsToUnicode(charCodes, font) {
|
||||
var glyphs = font.charsToGlyphs(charCodes);
|
||||
var result = '';
|
||||
for (var i = 0, ii = glyphs.length; i < ii; i++) {
|
||||
var glyph = glyphs[i];
|
||||
if (!glyph) {
|
||||
continue;
|
||||
}
|
||||
var glyphUnicode = glyph.unicode;
|
||||
if (glyphUnicode in NormalizedUnicodes) {
|
||||
glyphUnicode = NormalizedUnicodes[glyphUnicode];
|
||||
}
|
||||
result += reverseIfRtl(glyphUnicode);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function adjustWidths(properties) {
|
||||
if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue