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

Handle all the whitespaces the same way when creating text chunks

This commit is contained in:
Calixte Denizet 2022-01-07 21:20:53 +01:00
parent 9bb636402a
commit 9dae421a0d
3 changed files with 27 additions and 11 deletions

View file

@ -34,6 +34,12 @@ import {
recoverGlyphName,
SEAC_ANALYSIS_ENABLED,
} from "./fonts_utils.js";
import {
getCharUnicodeCategory,
getUnicodeForGlyph,
getUnicodeRangeFor,
mapSpecialUnicodeValues,
} from "./unicode.js";
import { getDingbatsGlyphsUnicode, getGlyphsUnicode } from "./glyphlist.js";
import {
getEncoding,
@ -50,11 +56,6 @@ import {
getSupplementalGlyphMapForArialBlack,
getSupplementalGlyphMapForCalibri,
} from "./standard_fonts.js";
import {
getUnicodeForGlyph,
getUnicodeRangeFor,
mapSpecialUnicodeValues,
} from "./unicode.js";
import { IdentityToUnicodeMap, ToUnicodeMap } from "./to_unicode_map.js";
import { CFFFont } from "./cff_font.js";
import { FontRendererFactory } from "./font_renderer.js";
@ -212,6 +213,10 @@ class Glyph {
this.operatorListId = operatorListId;
this.isSpace = isSpace;
this.isInFont = isInFont;
const category = getCharUnicodeCategory(unicode);
this.isWhitespace = category.isWhitespace;
this.isDiacritic = category.isDiacritic;
}
matchesForCache(