Skip to content

fix(android): fetch desktop-installed fonts the scene uses - #1271

Merged
CaYatur merged 7 commits into
dev/androidfrom
fix/phone-pc-font
Dec 1, 2026
Merged

CaYatur merged 7 commits into
dev/androidfrom
fix/phone-pc-font

Conversation

@CaYatur

@CaYatur CaYatur commented Dec 1, 2026

Copy link
Copy Markdown
Owner

For #1176

Reported: a font installed on the PC is selected for a text layer; the phone shows it as selected but does not apply it. The font was CaYa Font, installed in the Windows per-user font folder and picked from the System group, so the settings have font: "\"CaYa Font\", system-ui, …" and no fontId. The phone only fetched fonts by fontId.

Checked on the emulator against a desktop built from this branch (isolated profile, the real installed CaYa-Font.otf read, nothing installed): 8/8

  • default stack only: nothing transferred;
  • text with "CaYa Font" and no id: the face arrived in 1.06 s, SHA-256 identical to the PC file (49,680 bytes);
  • the phone's FontFace CaYa Font loaded, document.fonts.check true, measured text width differs from the fallback (754 vs 706 px);
  • a text layer shaped like the user's draws "CAYADEV" in the font on screen, also after an app restart.

npm test 4947 pass, 1 skipped (count docs 4948); phone JS tests 162/162.

CaYatur and others added 7 commits December 1, 2026 19:57
…the phone

- Font list with 1,098 faces (Windows fonts plus two renamed copies):
  first read 337-344 ms, from the cache file 151-162 ms, longest stall 2 ms.
- A video clip with its sound on, 600 s in the panel: audio minus video
  median 33 ms, max 64 ms; no growth over time and no re-seeks.
- Desktop and emulator paired: the phone fetched a missing library font in
  1.07 s with identical bytes and both axes.

For #1175 #1176

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
docs(bench): 1,098 system fonts, 10-minute clip A/V gap, PC fonts on the phone
Text whose font was picked from the System group has only a CSS family
and no fontId. The link moved library fonts only, and the engine
registered faces only through fontId, so the phone showed the family as
selected but drew the fallback stack.

- font.list takes { families } and adds the installed faces of those
  families that the library lacks. Ids are sys-<sha1 of path>; only
  .ttf/.otf, and faces whose OS/2 fsType marks a restricted license are
  left out. Only listed ids are read; no path leaves the desktop.
- The system font scan keeps fsType and axes (cache v2) and the file
  path for the main process; the panel IPC strips the path.
- font-runtime registers the faces of every family named first in a
  font value, not only those reached through fontId. The fallback stack
  and generic families are ignored.

For #1176

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
…phone-pc-font

# Conflicts:
#	README.md
#	README.tr.md
#	ROADMAP.md
fix(fonts): send desktop-installed fonts to the phone over the link
Text whose font was picked from the desktop's System group has only a
CSS family and no fontId, so the phone never asked for it and drew the
fallback stack while the inspector showed the family as selected.

syncFonts now also takes the first family of every font value in the
drawn settings (FR.usedFamilies, from main), and for families missing
from the phone's font library calls font.list { families }. Matching
faces are fetched like library faces. A family the desktop does not
offer (not installed, or a restricted license) is not asked again.
An older desktop ignores the argument.

For #1176

Co-authored-by: caganturgut <271973834+caganturgut@users.noreply.github.com>
@CaYatur
CaYatur merged commit f6df620 into dev/android Dec 1, 2026
7 checks passed
@CaYatur
CaYatur deleted the fix/phone-pc-font branch December 1, 2026 17:42
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 this pull request may close these issues.

1 participant