Versions and Changes
About 837 words
Header.version tells a reader which version of the specification a file follows. This page explains how to read the version number and what a reader does when it meets different versions, and lists all changes from 1.0 to 1.1.
Current version
UInk 1.1, Header.version = 11.
Version numbers
version | Name | Status |
|---|---|---|
10 | UInk 1.0 Beta | Superseded by 1.1; a single-file archive(Open in new window) (in Chinese) is available |
11 | UInk 1.1 | Current version |
Rules
- VER-1 Version number = major version × 10 + minor version.
10is 1.0,11is 1.1, and20will be 2.0. - VER-2 A 1.1 writer must write
version = 11, even if the file uses only capabilities that already existed in 1.0. - VER-3 A reader first validates the first block: it must be an
array(7)Header withtype = 0and aversionfrom10through19inclusive. If any condition is not met, the reader must refuse to parse the file as UInk 1.x. - VER-4 When a reader meets a file with the same major version but a higher minor version, it must read it on a best-effort basis: skip unknown blocks and keys, display the rest by the known rules, and it may tell the user "The file comes from a newer version; some content may not be displayed".
- VER-5 A 1.1 reader does not guarantee full compatibility with
version = 10files; when it meets one, it should read it on a best-effort basis: parse it by the 1.1 rules, skip content that is unknown or does not conform to 1.1, display the rest, and it may tell the user "The file comes from UInk 1.0; some content may not be displayed correctly". Coordinates in 1.0 files are likewise interpreted as Device pixels, without conversion. - VER-6 UInk registers no magic identifier. The
.uinkextension is only used to recognize files and does not replace the check in VER-3. - VER-7 When doing a full save of the same logical file,
Header.guid, the GUIDs of existing Workspaces / Devices and thepageGuidof existing pages must not change; when using "Save As" to create a new logical file, a newHeader.guidmust be generated. - VER-8 UInk 1.1 has been frozen as a final release. Any incompatible change from now on must use a new
version.
1.0 errata
The original 1.0 Beta text required "version must equal 10, otherwise refuse to read". This is now replaced by VER-3 and VER-4: a 1.0 reader that meets version = 11 should read it on a best-effort basis.
After updating per the errata, a 1.0 reader opening a 1.1 file ignores the new fields and displays the rest by the 1.0 rules. Page-append files that have not been compacted (the same page appears more than once) may display incorrectly in a 1.0 reader; after the file is compacted into a compact file, it displays normally.
1.0 → 1.1 changes
Added
| Content | Page |
|---|---|
| Feature levels: Core, Basic, Standard, Full and the Inkeys extension | Levels and Certification |
| Reading fallback and compatible export | Compatibility and Fallback |
| Page append: a new version of the same page is appended to the end of the file, and the last one to appear wins | Saving, Appending and Recovery |
Page metadata: background, pageState, pageKind, binding | Canvas Block |
Nib description nib and cap cap; lineCap / lineJoin for Shape strokes | Nibs and Caps |
Shape object layer object, and the Shape Preset Registry at Full | Shape Block, Shape Preset Registry |
Media fit and crop | Media Block |
| How to write curves and free-form shapes: sample them in order into Polyline / Polygon, and write disconnected pieces separately (SHAPE-24, SHAPE-25) | Shape Block |
Rule IDs, Glossary, single-file spec and llms.txt | Glossary |
Changed
| Content | 1.0 | 1.1 |
|---|---|---|
| Version check | Accepts only 10 | Accepts 10–19; see VER-3, VER-4 |
| Coordinate unit | Platform-independent logical pixels | Device pixels; DPI is not recorded, and scaling is expressed by viewport.scale |
| Same Canvas unique key | Must not repeat within a file | May repeat; the later one replaces the earlier one as a whole |
| Incremental write target | Only appending to the last Canvas | Can also append a complete new version of any page |
| Clear | All readers must support it | Belongs to the Inkeys extension; other readers handle it by the fallback rules |
| Erase Ink | Standard capability | Belongs to the Inkeys extension; readers that do not implement that level must skip it |
renderOnlyWhenLatest | Standard capability | Belongs to Full; lower-level readers ignore it |
PowerPoint binding by pageIndex | No official field | Canvas binding = 1, slideId optional |
Unchanged
Header layout, Type IDs, MessagePack encoding rules, the undo model (undoId groups, redo not saved), resource package format and security rules, and the commit order of a full save.