Skip to content

Character references for IVS doesn’t work #15821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Paalon opened this issue Apr 23, 2025 · 1 comment · Fixed by #15823
Closed

Character references for IVS doesn’t work #15821

Paalon opened this issue Apr 23, 2025 · 1 comment · Fixed by #15823

Comments

@Paalon
Copy link

Paalon commented Apr 23, 2025

Describe the bug

Character references defined in HTML[1] for ideographic variation sequences (IVS) defined in Unicode[2] doesn’t work.

  1. https://html.spec.whatwg.org/multipage/syntax.html#character-references
  2. https://www.unicode.org/reports/tr37/

Reproduction

  1. Make a minimal project by npx sv.
  2. Download a font file “Noto Serif JP” from Google Fonts (https://fonts.google.com/noto/specimen/Noto+Serif+JP) (the Google Fonts’ webpage uses the name “Noto Serif Japanese” but internally it seems to use the name “Noto Serif JP”).
  3. Place the downloaded font file NotoSerifJP-VariableFont_wght.ttf to the static directory of the project.
  4. Write the following to src/routes/+page.svelte:
<div class="font-noto-serif-jp">
  通&#xE0100;通&#xE0101;
</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>
  1. Check the following output:
Image

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:

Image

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

@Serator
Copy link

Serator commented Apr 23, 2025

Svelte 5.28.2

@Paalon Built a small demo with similar code and everything works. Are you sure the issue is not on your side?

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants