Commit Graph
1 Commits
Author SHA1 Message Date
adminandClaude Fable 5 f77092bff2 fontfix: va subset PDF cho FontFace - them OS/2 + cmap (3,1) format 4 tu /ToUnicode
Build Windows portable / build (push) Canceled after 0s
Build 34 tra bytes font tho nhung OTS cua WebView tu choi het (bat qua CDP
Log): (1) "OS/2: missing required table", (2) "cmap: no supported subtables"
- subset LibreOffice chi co cmap (1,0) format 0, ma tuy bien: ASCII giu
nguyen ma, chu Viet co dau gan ma thap 1-31 (chi /ToUnicode giai nghia duoc).

- fontfix.rs: dung OS/2 v4 (96B) tu head/hhea + co dam/nghieng cua run
  (fsSelection/usWeightClass - khong bi synthesize bold chong); convert cmap
  (1,0) fmt 0/6 -> (3,1) format 4 (segment gop cap lien tiep, moi glyph 1
  segment khi roi rac); ghep lai sfnt: danh muc sort theo tag, pad 4B,
  checksum bang + head.checkSumAdjustment (tong = B1B0AFBA); tag 'true' ->
  0x00010000. Khong phai sfnt (CFF tran) tra nguyen trang.
- tounicode.rs: doc /ToUnicode qua lopdf (bfchar/bfrange ca 2 dang, UTF-16BE
  ke ca surrogate pair; ligature nhieu ky tu bo qua), match BaseFont theo
  suffix sau prefix subset "ABCDEF+", tim ca trong resources cua Form
  XObject (sau 3) cho file Canva. Ma khong co ToUnicode: ASCII identity +
  MacRoman cho ma cao; ma thap khong giai nghia duoc thi bo (ky tu roi xuong
  font ke trong stack CSS).

Kiem chung truoc CI: nhan ban logic sang Node, va bytes THAT cua
NotoSansMono-Bold subset (dump tu app) -> FontFace load OK trong WebView2
that (truoc: SyntaxError). Unit test: OS/2 + checksum + format 4 lookup
('A' giu glyph, 'a?' theo ToUnicode) + bfchar/bfrange parser.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-10 11:32:17 +07:00