mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
Merge pull request #7048 from penpot/elenatorro-11704-fix-symbols-font
✨ Include symbols support
This commit is contained in:
commit
61d93d69b1
8 changed files with 1939 additions and 20 deletions
BIN
frontend/playwright/data/render-wasm/assets/notomusicsubset.ttf
Normal file
BIN
frontend/playwright/data/render-wasm/assets/notomusicsubset.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
1881
frontend/playwright/data/render-wasm/get-file-text-symbols.json
Normal file
1881
frontend/playwright/data/render-wasm/get-file-text-symbols.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -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();
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 131 KiB |
Loading…
Add table
Add a link
Reference in a new issue