Merge pull request #7048 from penpot/elenatorro-11704-fix-symbols-font

 Include symbols support
This commit is contained in:
Alejandro Alonso 2025-08-05 13:40:16 +02:00 committed by GitHub
commit 61d93d69b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 1939 additions and 20 deletions

File diff suppressed because it is too large Load diff

View file

@ -27,6 +27,21 @@ async function mockGetJapaneseFont(workspace) {
);
}
async function mockGetSymbolsFont(workspace) {
await workspace.mockGetAsset(
/notosanssymbols.*\.ttf$/,
"render-wasm/assets/notosanssymbolssubset.ttf"
);
await workspace.mockGetAsset(
/notosanssymbols2.*\.ttf$/,
"render-wasm/assets/notosanssymbols2subset.ttf"
);
await workspace.mockGetAsset(
/notomusic.*\.ttf$/,
"render-wasm/assets/notomusicsubset.ttf"
);
}
test("Renders a file with texts", async ({ page }) => {
const workspace = new WasmWorkspacePage(page);
@ -144,6 +159,22 @@ test("Renders a file with texts with images", async ({ page }) => {
await expect(workspace.canvas).toHaveScreenshot();
});
test("Renders a file with texts with emoji and different symbols", async ({ page }) => {
const workspace = new WasmWorkspacePage(page);
await workspace.setupEmptyFile();
await mockGetEmojiFont(workspace);
await mockGetSymbolsFont(workspace);
await workspace.mockGetFile("render-wasm/get-file-text-symbols.json");
await workspace.goToWorkspace({
id: "74d31005-5d0c-81fe-8006-949a8226e8c4",
pageId: "74d31005-5d0c-81fe-8006-949a8226e8c5",
});
await workspace.waitForFirstRender();
await expect(workspace.canvas).toHaveScreenshot();
});
test("Renders a file with text decoration", async ({ page }) => {
const workspace = new WasmWorkspacePage(page);
await workspace.setupEmptyFile();