Character references for IVS doesn’t work
#15821
Development PR
fixes #15821
Source: https://en.wikipedia.org/wiki/Plane_(Unicode)#Supplementary_Special-purpose_Plane
Before submitting the PR, please make sure you do the following
- It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
- Prefix your PR title with
feat:,fix:,chore:, ordocs:. - This message body should clearly illustrate what problems it solves.
- Ideally, include a test that fails without this PR but passes with it.
- If this PR changes code within
packages/svelte/src, add a changeset (npx changeset).
Tests and linting
- Run the tests with
pnpm testand lint the project withpnpm lint
Issue
Solved
P
Paalon Apr 23, 2025, 7:24 AMDescribe the bug
Character references defined in HTML[1] for ideographic variation sequences (IVS) defined in Unicode[2] doesn’t work.
Reproduction
- Make a minimal project by
npx sv. - Download a font file “Noto Serif JP” from Google Fonts () (the Google Fonts’ webpage uses the name “Noto Serif Japanese” but internally it seems to use the name “Noto Serif JP”).
- Place the downloaded font file
NotoSerifJP-VariableFont_wght.ttfto thestaticdirectory of the project. - Write the following to
src/routes/+page.svelte:
<div class="font-noto-serif-jp">
通󠄀通󠄁
</div>
<style>
@font-face {
font-family: "Noto Serif JP";
src: url("/NotoSerifJP-VariableFont_wght.ttf") format("truetype");
}
.font-noto-serif-jp {
font-family: "Noto Serif JP";
}
</style>
- Check the following output:
The first character must has one point at the top‐left, and the second character must has two points at the top‐left. So they must be different. However, both have only one point, they are same.
We can confirm naive HTML + CSS gives the desired result:
Logs
System Info
npx envinfo --system --npmPackages svelte,roolup,webpack --binaries --browsers
System:
OS: macOS 15.4.1
CPU: (8) arm64 Apple M3
Memory: 226.14 MB / 24.00 GB
Shell: 4.0.1 - /opt/homebrew/bin/fish
Binaries:
Node: 23.11.0 - /opt/homebrew/bin/node
npm: 10.9.2 - /opt/homebrew/bin/npm
pnpm: 10.7.0 - ~/Library/pnpm/pnpm
Browsers:
Safari: 18.4
npmPackages:
svelte: ^5.0.0 => 5.28.2
Severity
annoyance
Info
Closed at Apr 23, 2025, 2:49 PM
Assignees None
Labels None
Milestone None
Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)