mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-24 09:08:07 +02:00
Merge pull request #19548 from Snuffleupagus/Font-exportData-disableFontFace-fontExtraProperties
Send `disableFontFace` and `fontExtraProperties` as part of the exported font-data
This commit is contained in:
commit
da17c7b82f
9 changed files with 132 additions and 115 deletions
|
@ -16,17 +16,22 @@ describe("font_fpgm", function () {
|
|||
const cMap = await CMapFactory.create({
|
||||
encoding: Name.get("Identity-H"),
|
||||
});
|
||||
const font = new Font("font", new Stream(font2324), {
|
||||
loadedName: "font",
|
||||
type: "CIDFontType2",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap,
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
});
|
||||
const font = new Font(
|
||||
"font",
|
||||
new Stream(font2324),
|
||||
{
|
||||
loadedName: "font",
|
||||
type: "CIDFontType2",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap,
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
},
|
||||
{}
|
||||
);
|
||||
const output = await ttx(font.data);
|
||||
|
||||
verifyTtxOutput(output);
|
||||
|
|
|
@ -17,16 +17,21 @@ describe("font_post", function () {
|
|||
|
||||
describe("OS/2 table removal on bad post table values", function () {
|
||||
it("has invalid version number", async function () {
|
||||
const font = new Font("font", new Stream(font2154), {
|
||||
loadedName: "font",
|
||||
type: "TrueType",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
});
|
||||
const font = new Font(
|
||||
"font",
|
||||
new Stream(font2154),
|
||||
{
|
||||
loadedName: "font",
|
||||
type: "TrueType",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
},
|
||||
{}
|
||||
);
|
||||
const output = await ttx(font.data);
|
||||
|
||||
verifyTtxOutput(output);
|
||||
|
@ -39,17 +44,22 @@ describe("font_post", function () {
|
|||
const cMap = await CMapFactory.create({
|
||||
encoding: Name.get("Identity-H"),
|
||||
});
|
||||
const font = new Font("font", new Stream(font1282), {
|
||||
loadedName: "font",
|
||||
type: "CIDFontType2",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap,
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
});
|
||||
const font = new Font(
|
||||
"font",
|
||||
new Stream(font1282),
|
||||
{
|
||||
loadedName: "font",
|
||||
type: "CIDFontType2",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap,
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
},
|
||||
{}
|
||||
);
|
||||
const output = await ttx(font.data);
|
||||
|
||||
verifyTtxOutput(output);
|
||||
|
|
|
@ -24,17 +24,22 @@ describe("font_post", function () {
|
|||
const cMap = await CMapFactory.create({
|
||||
encoding: Name.get("Identity-H"),
|
||||
});
|
||||
const font = new Font("font", new Stream(font2109), {
|
||||
loadedName: "font",
|
||||
type: "CIDFontType2",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap,
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
});
|
||||
const font = new Font(
|
||||
"font",
|
||||
new Stream(font2109),
|
||||
{
|
||||
loadedName: "font",
|
||||
type: "CIDFontType2",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
cMap,
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
},
|
||||
{}
|
||||
);
|
||||
const output = await ttx(font.data);
|
||||
|
||||
verifyTtxOutput(output);
|
||||
|
@ -42,16 +47,21 @@ describe("font_post", function () {
|
|||
});
|
||||
|
||||
it("has invalid glyph name indexes", async function () {
|
||||
const font = new Font("font", new Stream(font2189), {
|
||||
loadedName: "font",
|
||||
type: "TrueType",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
});
|
||||
const font = new Font(
|
||||
"font",
|
||||
new Stream(font2189),
|
||||
{
|
||||
loadedName: "font",
|
||||
type: "TrueType",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
},
|
||||
{}
|
||||
);
|
||||
const output = await ttx(font.data);
|
||||
|
||||
verifyTtxOutput(output);
|
||||
|
@ -59,16 +69,21 @@ describe("font_post", function () {
|
|||
});
|
||||
|
||||
it("has right amount of glyphs specified", async function () {
|
||||
const font = new Font("font", new Stream(font2374), {
|
||||
loadedName: "font",
|
||||
type: "TrueType",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
});
|
||||
const font = new Font(
|
||||
"font",
|
||||
new Stream(font2374),
|
||||
{
|
||||
loadedName: "font",
|
||||
type: "TrueType",
|
||||
differences: [],
|
||||
defaultEncoding: [],
|
||||
toUnicode: new ToUnicodeMap([]),
|
||||
xHeight: 0,
|
||||
capHeight: 0,
|
||||
italicAngle: 0,
|
||||
},
|
||||
{}
|
||||
);
|
||||
const output = await ttx(font.data);
|
||||
|
||||
verifyTtxOutput(output);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue