Skip to content

Releases

F-Office v0.3.1

Choose a tag to compare

@osolmaz osolmaz released this 02 Dec 11:19

Upgrades Compatifont to v0.2.2 (adding Arimo Black CF for Arial Black), updates the default Compatifont CDN to https://cdn.compatifont.com/v0.2.2, and includes layout, chart, table, and font-resolution improvements.

v0.3.0

Choose a tag to compare

@osolmaz osolmaz released this 01 Dec 17:23

Compatifont 0.2.0 & East Asian Stand-In Support

  • Compatifont 0.2.0 (f-office-docx, f-office-fonts, @f-office/docs): Upgrades compatifont to 0.2.0 (adding all 10 Wave 1 East Asian stand-in families to compatifont::known()) and updates DEFAULT_COMPATIFONT_CDN to https://cdn.compatifont.com/v0.2.0 (23 families, 60 faces).
  • Verified metric stand-ins as Exact: Classifies verified Compatifont metric stand-ins (Basis::Check, Level::Widths, matching Group::Line metrics) as SubstituteLayout::Metrics / FontMatchKind::MetricStandIn under FidelityLevel::Exact, matches legacy Compatifont names against typographic family/style entries (e.g. Aptos Display, Arial Narrow), and differentiates approximate fidelity banner copy for unverified widths, version mismatches, and unrelated fallbacks.
  • Stand-in synthetic styles & em-grid precision: Computes synthetic bold and italic on stand-in faces (FontChoice::draw_stand_in) and preserves target units_per_em rounding granularity (256 / 1024 upem) for East Asian single-line room, synthetic-bold advance widening, and whole-line checks.

Viewer & Web Packages (@f-office/docs, @f-office/docs-react)

  • Monotonic load progress (OpenProgressTracker): Normalizes OpenProgress.fraction into a single monotonic 0..1 sequence across engine, scan, fonts, layout, and render stages for both cold and warm loads, buffering pre-open engine progress while idle.
  • Document download: Adds File → Download (.docx) in @f-office/docs-react with the OOXML DOCX MIME type.

DOCX Layout & Rendering Improvements

  • 3-D clustered column charts: Adds 3-D clustered column chart rendering in f-office-docx and f-office-effects.
  • Borders & tables: Refines multi-line page border corner joining, nesting, and white gap painting; cuts table borders at page foot and split-row junctions; and places spacing-zero cell-box borders by their inner edges.
  • Text, bidi, fields, and metafiles: Adds pixel-depth single underlines for East Asian faces, device-width tab leader stepping and stop placement, FILENAME field resolution in headers/footers, run splitting after leading unmapped symbols with non-default East Asian fonts, w:rtl/w:cs gating for complex-script slots/sizes, mixed-run RTL ordering and bracket mirroring, and scaled 0.14 pt cosmetic/sub-hairline EMF/WMF pens.

v0.2.4

Choose a tag to compare

@osolmaz osolmaz released this 01 Dec 06:58

Document Rendering Fidelity & Font Status

  • Typed fidelity reporting (f-office-docx, f-office, f-office-wasm): Distinguishes exact metric stand-ins from fallback substitutions (SubstituteLayout::Fallback), records natively matched fonts, emits privacy-safe missing-glyph warnings grouped by font and Unicode block (Warning::GlyphMissing), and exposes a typed FidelityReport via Document::fidelity() and Session::fidelity().
  • Worker & Web Component events (@f-office/docs): Streams typed FidelityReport through the worker and <f-office-docs> (el.fidelity, docs.fidelity, fidelitychange event, onFidelityChange option).
  • Document Fidelity UI (@f-office/docs-react): Adds a quiet check icon beside the document title when fonts match exactly, an amber/red warning pill and dismissible banner (DocsFidelityBanner) when fonts fall back or glyphs/elements degrade, a Document Fidelity popover showing the font match table, missing characters, and render notes, plus View → Fonts → Document fonts… in the menu bar and onFidelityChange on headless <FOfficeDocs />.

DOCX Layout & Formatting Fixes

  • Preserve body-level w:customXml content in the streamed XML reader.
  • Improve SmartArt line placement and last-line spacing, and fix zero atLeast line-spacing handling with the document line grid.
  • Include numbering list-label fonts and chosen math font families when scanning document font needs.

v0.2.3

Choose a tag to compare

@osolmaz osolmaz released this 30 Nov 18:45

Progressive Page-1-First DOCX Loading & Open Progress

  • Single-parse staged opening & incremental layout (f-office-docx, f-office, f-office-docs, f-office-wasm): Parses the DOCX once, scans font needs without a full dummy layout pass, yields as soon as Page 1 is ready, and lays out remaining pages in short non-blocking slices while preserving scroll state and invalidating only pages affected by multi-pass fields (NUMPAGES, PAGEREF, TOC).
  • Worker scheduler & structured progress (@f-office/docs): Prioritizes interactive input and visible page draws over background layout slices and print copies; emits progress (engine, scan, fonts, layout, render) and pageschange events alongside onProgress on FOfficeDocs.
  • React 19 progress UI (@f-office/docs-react): <DocsCanvas /> renders a top progress bar (role="progressbar") during streaming, DocsPageControls shows Page X of Y… until layout completes, and <FOfficeDocs /> exposes onProgress and onPagesChange.

Viewer & Theme Fixes

  • Forward DocsProvider theme to Radix portals and scope :root[data-theme] fallbacks and print styles cleanly when embedded.
  • Apply zoom="fit-width" / zoom="fit-page" before "open" fires on <f-office-docs> and keep the floating outline toggle hidden under chrome="none" unless outline-button / outlineButton is opted in.

DOCX Layout Fidelity

  • Support w:beforeLines / w:afterLines paragraph spacing.
  • Honor layoutInCell and VML o:allowincell for page-relative floating drawings inside table cells.
  • Improve table style basedOn margin resolution and East Asian trailing auto-space / punctuation compression handling.

v0.2.2

Choose a tag to compare

@osolmaz osolmaz released this 30 Nov 15:30

What's Changed

  • New Rust crate f-office-docs: Interactive DOCX viewport, hit-testing, selection, outline, find, and optional datagen binary (f-office-docs-data) for building ICU4X word-break dictionaries.
  • New npm package @f-office/docs-react: Composable React 19 UI primitives (DocsProvider, useDocs, FOfficeDocs, DocsHeader, DocsCanvas, DocsDialogs, DocsApp) with precompiled stylesheet (@f-office/docs-react/styles.css).
  • @f-office/docs@0.2.2: Bundles lazy dictionaries.postcard (@f-office/docs/dictionaries), fixes bundler resolution for @f-office/core inside the Web Worker, adds @f-office/docs/chrome helpers, and verifies Compatifont CDN fonts (https://cdn.compatifont.com/v0.1.2).
  • Performance & Mobile: Zero-clone ImageBitmap page transfers, streaming DOCX/PDF I/O, 2-pass progressive draft rendering, smooth pinch zoom, and HiDPI viewport fixes.
  • DOCX Layout: Numerous Microsoft Word layout fidelity improvements across tables, floating drawings, line spacing, East Asian typography, and style toggle properties.

v0.2.1

Choose a tag to compare

@osolmaz osolmaz released this 30 Nov 08:27

Highlights

  • Browser & Node.js packaging (@f-office/core, @f-office/docs):
    • Split "browser" and "node" conditional exports in @f-office/core so browser bundles and Web Workers never import node:fs/promises.
    • Fixed "sideEffects" declarations (["./dist/worker.js"] in @f-office/core, ["./dist/element.js"] in @f-office/docs) and added Content Security Policy (CSP) guidance to both READMEs.
  • Whole-document search, scrollTo, and lazy highlights:
    • Added worker-backed Document.search(query, options) over the compact TextMap in f-office-wasm / @f-office/core, returning lightweight { page, rects, range, snippet } matches without rendering offscreen pages.
    • Added FOfficeDocs.search(), scrollTo(page, rect, options), and lazy per-page setHighlights() / clearHighlights(kind?) in @f-office/docs (and <f-office-docs>).
  • Optional pure-Rust WOFF2 font decoding:
    • Added the optional woff2 feature in f-office-fonts (pure Rust via wuff, no C++ dependency), enabled in f-office-wasm / @f-office/core so Renderer.addFont() transparently decodes .woff2 fonts.
  • DOCX layout & PDF writer improvements:
    • Restored Type 2 Shading Pattern fills for gradients in the streaming PDF writer and preserved image clips on unrewritable CMYK JPEGs and large pre-IDAT PNG headers.
    • Improved RTL reading order, East Asian punctuation kerning, inline table wrap clearing, continuous section adoption after empty page breaks, split-row vertical alignment, and blanks-only line heights before manual breaks.

F-Office v0.2.0

Choose a tag to compare

@osolmaz osolmaz released this 30 Nov 05:00

Memory efficiency, streaming PDF export, zero-copy browser file I/O, and the new @f-office/viewer drop-in browser component.

Install

CLI (foffice) — bundles metric-compatible open fonts from Compatifont (OFL-1.1):

# From crates.io
cargo install f-office-cli

# Or via cargo-binstall / prebuilt archives attached to this release
cargo binstall f-office-cli

# Or via Homebrew (macOS and Linux)
brew install osolmaz/tap/foffice

Rust library:

cargo add f-office

JavaScript / TypeScript (browser and Node.js):

npm install @f-office/wasm @compatifont/fonts
# Drop-in browser viewer component:
npm install @f-office/viewer @f-office/wasm @compatifont/fonts

What's new in v0.2.0

  • Handle-based lazy images (ImageRef): Document::open now reads only image headers for layout dimensions instead of eagerly pinning image byte buffers in memory; rasterization and PDF export decode images on demand behind a bounded LRU cache.
  • Flat-arena XML, streaming <w:body>, and compact text index (TextMap): f-office-xml::Document uses flat arenas and a single string buffer while preserving exact byte spans for foffice edit; <w:body> top-level blocks stream during layout; Document retains a compact reading-order TextMap instead of full Vec<PlacedLine>.
  • Streaming PDF export: Replaced in-memory PDF assembly with a streaming Write-based PDF emitter (Document::write_pdf_to, foffice convert --to pdf, and @f-office/wasm writePdfTo / worker writePdfBlob).
  • Zero-copy browser & random-access file I/O: Added RandomAccessRead + Package::open_source / Document::open_source, plus createBlobSource (File.slice() / FileReaderSync), createOpfsSource (FileSystemSyncAccessHandle), openDocxFile, and openDocxOpfs in @f-office/wasm so large DOCX files do not need to be copied into WASM linear memory.
  • New @f-office/viewer package: Drop-in <f-office-viewer> Web Component and createDocxViewer() API with virtualized page scrolling, HiDPI tiled renderRegion rendering + bounded LRU tile cache, zoom/fit modes, selectable text layer, on-demand @compatifont/fonts loading + worker-recycle font replay, and streaming PDF export.
  • Layout and graphics fixes: DrawingML a:grpFill group fill inheritance, improved EMF/WMF shape and gradient rendering, math operator spacing fixes, and updated logo spacing.

Notes

  • Licensed under Apache-2.0 (bundled Compatifont font files are OFL-1.1).
  • Building from source requires Rust 1.100 or newer.
  • @f-office/wasm uses WebAssembly SIMD (Chrome 91+, Firefox 89+, Safari 16.4+, Node.js 18+).

F-Office v0.1.0

Choose a tag to compare

@osolmaz osolmaz released this 29 Nov 22:32

First public release of F-Office, a Rust and WebAssembly engine for laying out, rendering, editing, and visually comparing DOCX documents with Microsoft Word's pagination (word-win).

Install

CLI (foffice) — bundles metric-compatible open fonts from Compatifont (OFL-1.1):

# From crates.io
cargo install f-office-cli

# Or via cargo-binstall / prebuilt archives attached to this release
cargo binstall f-office-cli

# Or via Homebrew (macOS and Linux)
brew install osolmaz/tap/foffice

Rust library:

cargo add f-office

JavaScript / TypeScript (browser and Node.js):

npm install @f-office/wasm @compatifont/fonts

What's included in v0.1.0

  • DOCX layout and export: Open DOCX documents and export paginated PDFs and PNG page images (foffice convert, f-office, @f-office/wasm).
  • Structured reading and atomic editing: Inspect paragraphs and tables by stable address with page spans (foffice read) and apply atomic JSON edit lists that report which pages shifted (foffice edit).
  • Visual diffing: Compare two DOCX files page-by-page and render cropped changed regions (foffice diff).
  • WebAssembly engine: Lazy ZIP reading, reusable tiled rendering for mobile memory budgets, Web Worker helper (@f-office/wasm/worker), and on-demand font loading with @compatifont/fonts.
  • Prebuilt binaries: macOS (aarch64, x86_64), Linux (x86_64, aarch64), and Windows (x86_64) archives with SHA256SUMS.txt attached to this release.

Notes

  • Licensed under Apache-2.0 (bundled Compatifont font files are OFL-1.1).
  • Building from source requires Rust 1.100 or newer.
  • @f-office/wasm uses WebAssembly SIMD (Chrome 91+, Firefox 89+, Safari 16.4+, Node.js 18+).