emf-converter 4.24.0 → 4.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/browser.js +1786 -616
- package/dist/browser.mjs +1786 -616
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1788 -618
- package/dist/index.mjs +1788 -618
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -171,7 +171,7 @@ const png = await convertMetafileToDataUrl(buffer, { fonts });
|
|
|
171
171
|
- Glyphs are grid-fitted by the font's own TrueType instructions (including Windows' ClearType rules), scan-converted with dropout control, and placed on GDI's integer grid honouring Dx arrays, `ETO_*` flags and every `TA_*` alignment.
|
|
172
172
|
- Non-antialiased, grayscale or ClearType rendering is chosen from the font's quality; `fontSmoothing` sets what `DEFAULT_QUALITY` means (Windows' default is ClearType).
|
|
173
173
|
- Raster faces (MS Sans Serif, MS Serif, Courier, Small Fonts, System, Terminal, Fixedsys, Helv, Tms Rmn) are drawn from their bitmaps with GDI's size choice and stretching (up to 8 vertically, 5 horizontally). The size depends on the faces supplied: pass `8514sys.fon` and `8514fix.fon` along with `vgasys.fon` and `vgafix.fon` to get the System and Fixedsys sizes a 120 dpi or larger session draws.
|
|
174
|
-
- Rotated text uses GDI's rounded font matrix. Text from a compatible-mode metafile replays the recorded Dx array
|
|
174
|
+
- Rotated text uses GDI's rounded font matrix. Text from a compatible-mode metafile replays the recorded Dx array and the slight horizontal stretch (about 1.0006) Windows playback applies, which re-grid-fits a few Segoe UI heights and changes the rotation matrix of rotated glyphs. EMF+ `DrawString` honours the text rendering hint, string-format tracking and margins, and texture/gradient brushes.
|
|
175
175
|
|
|
176
176
|
Without `fonts`, text is drawn by the host's canvas font engine (supply `fontFamilyMap` to remap Windows face names). SVG output always keeps text as `<text>`; with `fonts` it carries GDI's exact per-glyph positions.
|
|
177
177
|
|
|
@@ -466,7 +466,7 @@ See [How it works](docs/how-it-works.md) for the pipeline, the Windows-parity de
|
|
|
466
466
|
|
|
467
467
|
## Limitations
|
|
468
468
|
|
|
469
|
-
Output is tested pixel for pixel against what Windows itself paints:
|
|
469
|
+
Output is tested pixel for pixel against what Windows itself paints: 899 of 910 test pictures match exactly. The rest differ by a few pixels, all in ClearType and EMF+ text. Text matches Windows only when the metafile's fonts are passed in `fonts`.
|
|
470
470
|
|
|
471
471
|
See [Limitations](docs/limitations.md) for the list, [Parity notes](docs/parity-notes.md) for the measurements and [Outstanding work](docs/outstanding-work.md) for what is still open.
|
|
472
472
|
|