: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
const name = dict.keyToNameMap[key];
if (!offsetTracker.isTracking(name)) {
offsetTracker.track(name, out.length);
out.push(0x1d, 0, 0, 0, 0);
out.push(...this.encodeNumber(value));
for (let k = 1, kk = values.length; k < kk; ++k) {
out.push(...this.encodeNumber(values[k]));
throw new FormatError(`Unknown data type of ${type}`);
out.push(...dict.opcodes[key]);
compileStringIndex(strings) {
const stringIndex = new CFFIndex();
for (const string of strings) {
stringIndex.add(stringToBytes(string));
return this.compileIndex(stringIndex);
compileCharStrings(charStrings) {
const charStringsIndex = new CFFIndex();
for (let i = 0; i < charStrings.count; i++) {
const glyph = charStrings.get(i);
if (glyph.length === 0) {
charStringsIndex.add(new Uint8Array([0x8b, 0x0e]));
charStringsIndex.add(glyph);
return this.compileIndex(charStringsIndex);
compileCharset(charset, numGlyphs, strings, isCIDFont) {
const numGlyphsLessNotDef = numGlyphs - 1;
out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xff, numGlyphsLessNotDef & 0xff]);
const length = 1 + numGlyphsLessNotDef * 2;
out = new Uint8Array(length);
const numCharsets = charset.charset.length;
for (let i = 1; i < out.length; i += 2) {
if (charsetIndex < numCharsets) {
const name = charset.charset[charsetIndex++];
sid = strings.getSID(name);
warn(`Couldn't find ${name} in CFF strings`);
out[i] = sid >> 8 & 0xff;
return this.compileTypedArray(out);
compileEncoding(encoding) {
return this.compileTypedArray(encoding.raw);
compileFDSelect(fdSelect) {
const format = fdSelect.format;
out = new Uint8Array(1 + fdSelect.fdSelect.length);
for (i = 0; i < fdSelect.fdSelect.length; i++) {
out[i + 1] = fdSelect.fdSelect[i];
let lastFD = fdSelect.fdSelect[0];
const ranges = [format, 0, 0, start >> 8 & 0xff, start & 0xff, lastFD];
for (i = 1; i < fdSelect.fdSelect.length; i++) {
const currentFD = fdSelect.fdSelect[i];
if (currentFD !== lastFD) {
ranges.push(i >> 8 & 0xff, i & 0xff, currentFD);
const numRanges = (ranges.length - 3) / 3;
ranges[1] = numRanges >> 8 & 0xff;
ranges[2] = numRanges & 0xff;
ranges.push(i >> 8 & 0xff, i & 0xff);
out = new Uint8Array(ranges);
return this.compileTypedArray(out);
compileTypedArray(data) {
compileIndex(index, trackers = []) {
const objects = index.objects;
const count = objects.length;
const data = [count >> 8 & 0xff, count & 0xff];
for (i = 0; i < count; ++i) {
lastOffset += objects[i].length;
if (lastOffset < 0x100) {
} else if (lastOffset < 0x10000) {
} else if (lastOffset < 0x1000000) {
for (i = 0; i < count + 1; i++) {
data.push(relativeOffset & 0xff);
} else if (offsetSize === 2) {
data.push(relativeOffset >> 8 & 0xff, relativeOffset & 0xff);
} else if (offsetSize === 3) {
data.push(relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff);
data.push(relativeOffset >>> 24 & 0xff, relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff);
relativeOffset += objects[i].length;
for (i = 0; i < count; i++) {
trackers[i].offset(data.length);
data.push(...objects[i]);
;// CONCATENATED MODULE: ./src/core/glyphlist.js
const getGlyphsUnicode = getLookupTableFactory(function (t) {
t.Abrevecyrillic = 0x04d0;
t.Abrevedotbelow = 0x1eb6;
t.Abrevehookabove = 0x1eb2;
t.Acircumflexacute = 0x1ea4;
t.Acircumflexdotbelow = 0x1eac;
t.Acircumflexgrave = 0x1ea6;
t.Acircumflexhookabove = 0x1ea8;
t.Acircumflexsmall = 0xf7e2;
t.Acircumflextilde = 0x1eaa;
t.Adieresiscyrillic = 0x04d2;
t.Adieresismacron = 0x01de;
t.Adieresissmall = 0xf7e4;
t.Ainvertedbreve = 0x0202;
t.Ccedillaacute = 0x1e08;
t.Ccedillasmall = 0xf7e7;
t.Cheabkhasiancyrillic = 0x04bc;
t.Chedescenderabkhasiancyrillic = 0x04be;
t.Chedescendercyrillic = 0x04b6;
t.Chedieresiscyrillic = 0x04f4;
t.Chekhakassiancyrillic = 0x04cb;
t.Cheverticalstrokecyrillic = 0x04b8;
t.Circumflexsmall = 0xf6f6;
t.Dcircumflexbelow = 0x1e12;
t.DieresisAcute = 0xf6cc;
t.DieresisGrave = 0xf6cd;
t.Dieresissmall = 0xf7a8;
t.Dotaccentsmall = 0xf6f7;
t.Dzeabkhasiancyrillic = 0x04e0;
t.Ecedillabreve = 0x1e1c;
t.Ecircumflexacute = 0x1ebe;
t.Ecircumflexbelow = 0x1e18;
t.Ecircumflexdotbelow = 0x1ec6;
t.Ecircumflexgrave = 0x1ec0;
t.Ecircumflexhookabove = 0x1ec2;
t.Ecircumflexsmall = 0xf7ea;
t.Ecircumflextilde = 0x1ec4;
t.Edieresissmall = 0xf7eb;
t.Einvertedbreve = 0x0206;
t.Eiotifiedcyrillic = 0x0464;
t.Endescendercyrillic = 0x04a2;
t.Enghecyrillic = 0x04a4;
t.Enhookcyrillic = 0x04c7;
t.Ereversedcyrillic = 0x042d;
t.Esdescendercyrillic = 0x04aa;
t.Ghemiddlehookcyrillic = 0x0494;
t.Ghestrokecyrillic = 0x0492;
t.Gheupturncyrillic = 0x0490;
t.Haabkhasiancyrillic = 0x04a8;
t.Hadescendercyrillic = 0x04b2;
t.Hardsigncyrillic = 0x042a;
t.Hungarumlautsmall = 0xf6f8;
t.Icircumflexsmall = 0xf7ee;
t.Idieresisacute = 0x1e2e;
t.Idieresiscyrillic = 0x04e4;
t.Idieresissmall = 0xf7ef;
t.Iebrevecyrillic = 0x04d6;
t.Iinvertedbreve = 0x020a;
t.Iishortcyrillic = 0x0419;
t.Imacroncyrillic = 0x04e2;
t.Izhitsacyrillic = 0x0474;
t.Izhitsadblgravecyrillic = 0x0476;
t.Kabashkircyrillic = 0x04a0;
t.Kadescendercyrillic = 0x049a;
t.Kahookcyrillic = 0x04c3;
t.Kastrokecyrillic = 0x049e;
t.Kaverticalstrokecyrillic = 0x049c;
t.Koppacyrillic = 0x0480;