Merge e96a1c9dbe9f555276734b133ca7f21d8892f99f into ec71e4ed651e659b06a4fa46ef0b18ff9ab2a8c7
This commit is contained in:
commit
c3d4ac2fea
@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FeatureTest, isNodeJS } from "../../src/shared/util.js";
|
||||
import { buildGetDocumentParams } from "./test_utils.js";
|
||||
import { getDocument } from "../../src/display/api.js";
|
||||
import { isNodeJS } from "../../src/shared/util.js";
|
||||
import { TextLayer } from "../../src/display/text_layer.js";
|
||||
|
||||
describe("textLayer", function () {
|
||||
@ -250,4 +250,21 @@ describe("textLayer", function () {
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("should use Calibri and Lucida Console on Windows with Firefox", async function () {
|
||||
spyOnProperty(FeatureTest, "platform", "get").and.returnValue({
|
||||
isWindows: true,
|
||||
isFirefox: true,
|
||||
});
|
||||
|
||||
const fontFamilyMap = TextLayer.fontFamilyMap;
|
||||
const expectedSansSerif = "Calibri, sans-serif";
|
||||
const expectedMonospace = "Lucida Console, monospace";
|
||||
|
||||
const actualSansSerif = fontFamilyMap.get("sans-serif");
|
||||
const actualMonospace = fontFamilyMap.get("monospace");
|
||||
|
||||
expect(actualSansSerif).toBe(expectedSansSerif);
|
||||
expect(actualMonospace).toBe(expectedMonospace);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user