mirror of
https://github.com/dolanmiu/docx.git
synced 2026-11-30 16:47:55 +01:00
* feat(layout): measure text with Pretext in a page's fonts, and lay it out as Word does
docx/layout can now measure how wide text is with a function the caller
gives it, through estimatePageNumbersWith({ measureWidth }). measureWithPretext
builds one on Pretext, taken from the caller, so docx doesn't depend on it.
Lines still break, tabs still move to their stops, and lines are still as
tall as Word makes them.
* fix: answer only the DevTools messages the Pretext comparison is waiting for
CodeQL flagged calling a callback looked up by an id from Chrome's
messages. Only a number id with a callback waiting for it is answered now.
* fix(docs): open the live examples' editor without a package's types when they can't be fetched
A package's types only help with editing, so a failed fetch or an error
page leaves them out rather than stopping the editor.