1) fontfix v2 (PDF tu Word/InDesign): tong hop bang name/post khi subset
thieu (OTS bat buoc); font CID/Identity-H KHONG co cmap -> dung cmap
(3,1) fmt4 tu /ToUnicode x /CIDToGIDMap (Identity: GID=CID; stream 2B/CID
parse tu descendant font); chan GID >= numGlyphs (maxp). tounicode.rs tra
FontMapping {code_to_uni, is_cid, cid_to_gid}.
2) Format TUNG CHU trong o sua (chuan Word/Foxit): boi den -> B/I (nut
toolbar khong cuop focus + Ctrl+B/I). UI tach span theo vung chon, dat
data-bold/italic-override; commit gui override tung doan (RichSegDto
bold/italic). Engine: bang style rich key theo (run nguon, override) -
doi bien the thi lay font BIEN THE THAT cung ho (fontmatch -> builtin ->
substitute), khong dung lai font goc. Test:
rich_seg_bold_italic_override_uses_variant_font.
3) Edit file OCR (scan + text an): khoi toan run render-mode INVISIBLE ->
ve rect TRANG che vung chu cu tren anh + ve text moi HIEN mau den (ca 4
duong ve: rich chinh/fallback tu, 1-style chinh/fallback). Test:
ocr_invisible_block_becomes_visible_with_cover.
4) Bu metrics kieu Adobe Sans MM trong o sua: span mang data-pdfw (be rong
that tren trang); fitEditLinesToPdf them pass letter-spacing de moi nhom
style chiem DUNG quang goc khi font thay the lech metrics (>2%); kep
+/-18% co chu.
5) Khoi dong het "do": cua so tao AN (visible:false), UI show() ngay khi
frontend san sang + man splash che phan nap dau; luoi an toan Rust hien
cua so sau 4s neu JS chet som.
6) Open with FoFreeXit.exe: co che argv (initial_file) van hoat dong - loi
nam o registry Applications tro exe CU (ban portable bi di chuyen/ghi
de) lam Windows hien lai hop chon app. Fix tu chua: moi lan khoi dong
dang ky lai HKCU (Applications command + ProgID FoFreeXit.pdf +
OpenWithProgids .pdf) tro exe hien tai, chay nen qua reg.exe.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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>