User yeu cau: khach hang khong co font chuan san — phan mem phai tu chuan bi
font, khong duoc thay bang font "gan giong". Truoc do font nhung cua PDF da
dung cho o sua (build 35), nhung con 3 khe ho roi ve font he thong: font
khong nhung trong PDF, font CFF khong va duoc, va KY TU MOI GO VAO khong co
trong subset (subset chi chua glyph da dung).
- scripts/fetch-fonts.ps1: tai 10 file Noto hinted static (Sans/Serif/Mono,
du Regular/Bold/Italic/BoldItalic, phu tieng Viet, ~6.7MB) + OFL license
vao fonts/ (gitignore; CI cache theo hash script).
- CI: fetch fonts + dong fonts/ vao zip portable (canh exe).
- Tauri: main() dat FOFREEXIT_FONTS_PATH (fonts/ canh exe, dev thi goc
workspace); command app_font_data(kind) tra base64 (whitelist 10 kind).
- UI: FontFace "ff-app-{sans|serif|mono}" dang ky theo weight/style, dung
GIUA stack: font nhung cua PDF -> Noto dong goi -> stack he thong (luoi
cuoi). Phan loai serif/sans/mono tu cssFontStack. Nap truoc cung font
nhung khi vao trang sua.
- Engine find_font_bytes (duong ghi file/reflow can font coverage): uu tien
tuyet doi fonts/ dong goi qua env — ket qua LUU ra giong nhau tren moi may
(truoc: lay Arial/Segoe cua Windows, may khach thieu font la khac ket qua).
E2E ke tiep (build 36): go ky tu ngoai subset trong o sua -> 100% glyph phai
tu font custom (nhung/dong goi), 0 glyph he thong.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
CI vòng 1 bắt đúng lỗi thiết kế: FPDFText_SetText trên con trong form KHÔNG
đánh dấu dirty_streams của form (chỉ RemovePageObject/InsertPageObjectAtIndex
mới làm — xem cpdf_pageobjectholder.cpp) nên mọi sửa in-place trong form
không bao giờ được ghi ra file. Test canary fail chính xác ở điểm này.
- Đổi feature pdfium-render pdfium_latest(7543) -> pdfium_7350 (cả ff-engine
lẫn app): mở remove_object cho Form XObject qua blanket impl
PdfPageObjectsCommon (wrapper 0.8.37 sót gate 7543 dù binding có đủ);
API 7350 là subset của DLL bblanchon mới, đã quét 0 hàm 7543-only.
- Mọi sửa/xoá con trong form = RÚT THẬT khỏi form (FPDFFormObj_RemoveObject,
thứ tự path sâu trước + cùng cha con lớn trước) -> form dirty -> ProcessForm
regenerate stream khi lưu. SetText con trong form = SetTextMode mới
NestedRecreate: rút khỏi form + tạo lại ở cấp trang giữ font gốc qua token
(probe như tầng 0 reflow; thiếu glyph -> nhúng lại bytes/cùng họ), matrix
đã compose.
- CI test thêm --test-threads=1: PDFium serialize qua 1 mutex toàn cục,
1 test panic khi giữ lock poison mutex làm 17 test song song chết oan.
Docs cập nhật theo (12-phase4-summary.md Iteration 4).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
File Canva gói toàn bộ nội dung trang vào 1 Form XObject nên chế độ sửa
không thấy gì để sửa. Engine giờ liệt kê PHẲNG đệ quy vào form
(FPDFFormObj_CountObjects/GetObject qua pdfium-render), mỗi mục có path
[i,j,...] + tích ma trận form để quy toạ độ/cỡ chữ về trang; index của
ObjectInfo/EditOp = vị trí trong danh sách phẳng (trang không form thì
trùng index trang — tương thích ngược, UI không đổi cách gửi op).
- SetText in-place/substitute + ReflowText + Delete hoạt động với run trong
form; xoá trong form = set_text chuỗi rỗng (FPDFFormObj_RemoveObject chưa
mở ở wrapper cho pdfium_7543), object mới vẽ ở cấp trang với matrix đã
compose.
- Đã xác minh trước: PDFium regenerate stream form khi con bị sửa
(ProcessForm / HasDirtyStreams) — canary test round-trip kèm theo.
- ObjectInfo thêm nested/expanded; UI bỏ khung form phủ trang + chặn kéo
run trong form (Transform chưa hỗ trợ).
- 4 test integration mới với fixture Form XObject tự dựng bằng lopdf
(dev-dependency mới); CI thêm bước cargo test -p ff-engine trước build
(máy dev không có Rust — CI là nơi duy nhất chạy test), cache thêm target/.
Chi tiết: docs/12-phase4-summary.md (Iteration 4).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Trước đây build tự động từ push chỉ upload artifact — link tải đó yêu cầu đăng
nhập GitHub (401 Requires authentication) khi tải qua trình duyệt/API thường.
Chỉ build thủ công (workflow_dispatch) mới tạo Release công khai. Giờ mọi
build thành công đều tạo Release để có link tải công khai ngay.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HgnbPwSoRGNH7LHsDUmRpk
.github/workflows/build-windows.yml chạy trên windows-latest:
- Fetch pdfium.dll + qpdf.exe (script sẵn có scripts/fetch-*.ps1)
- cargo build --release cho app Tauri (không cần WiX/NSIS vì đóng gói
portable thủ công, không dùng bundler cài đặt)
- Gộp FoFreeXit.exe + pdfium.dll + qpdf.exe (+ dll phụ thuộc) + hướng dẫn
vào 1 thư mục, nén FoFreeXit-portable-win64.zip
- Đăng làm workflow artifact (mọi lần chạy) + GitHub Release (khi trigger
thủ công workflow_dispatch) — người dùng tải trực tiếp từ GitHub, không
cần cài Rust/Visual Studio/Node để build hay chạy thử
scripts/portable-readme.txt: hướng dẫn chạy bằng tiếng Việt kèm trong zip,
ghi rõ OCR/LibreOffice là tuỳ chọn cài thêm (app vẫn chạy đủ tính năng
Viewer/Annotate/Organize/Edit/Bảo mật/Form không cần chúng).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HgnbPwSoRGNH7LHsDUmRpk