Commit Graph
40 Commits
Author SHA1 Message Date
aiongg 3ba72f54ce feat: write DesiredGlyphScaling of paragraph ranges
Text attribute 0x1B33 is DesiredGlyphScaling, a fraction written x100.
Paragraph run overrides in 10 documents store 0.96 to 0.99, matching the
22 IDML ParagraphStyleRange values; root styles and text defaults store
1.0 (IDML 100).

compare.py --exclude own/, trustworthy pairs: TextRange
PSR.DesiredGlyphScaling 0 -> 89/89, Cell/ParagraphStyleRange 0 -> 1/1;
no extra values.
2026-10-10 13:23:29 +00:00
aiongg bdf62e7646 feat: write GREP and line styles, more nested style codes and composite fonts
- GREP styles (0x1BBA) and line styles (0x1BBB) are decoded and written
  as AllGREPStyles and AllLineStyles on styles, text defaults and
  paragraph ranges; empty lists are not written.
- Nested style delimiters (^c), ^t, ^L, ^p, ^9 and ^S in brackets map to
  Dropcap, Tabs, Repeat, EndNestedStyle, Digits and Sentence.
- An AppliedFont whose family name (with <hhhh> escapes decoded) is a
  composite font's name is written as CompositeFont/<name>, except in
  character styles, which keep the name.

compare.py --exclude own/, trustworthy pairs: ParagraphStyle
AllGREPStyles 152/152, TextDefault 48/48, text ranges 320/320,
AllLineStyles 6/6 and 9/9, ParagraphStyle AllNestedStyles 54 -> 124/124,
TextDefault 4 -> 10/10, ParagraphStyle AppliedFont 4,664 -> 4,803/4,804,
TextDefault 1,232 -> 1,250/1,251, text ranges 84,909 -> 85,587/85,587.
No new extra values; no pair loses values.
2026-10-10 12:51:16 +00:00
aiongg 27b9733d83 fix: read centred tab stops and tab stops aligned on a character
Tab alignment code 1 is CenterAlign and code 3 CharacterAlign; a stop
with code 3 stores its alignment character as a UTF-16 unit after the
code, so a list with such a stop was not read at all. The character is
written as AlignmentCharacter. Evidence in attributes.md: 79 centred and
36 character-aligned stops, all matching.

compare.py --exclude own/, trustworthy pairs: P.TabList of paragraph
styles 1,803 -> 1,841 of 1,841, of text ranges 24,844 -> 24,900 of
24,900, of story paragraph ranges 968 -> 975 of 975 and of text
defaults 1,237 -> 1,242 of 1,242; no extra value. The mixed ink commit
before gains 1,206 values on its elements, not 1,140.
2026-10-10 09:39:46 +00:00
aiongg d7bc060fd4 feat: read eleven more text attributes and the page item default angles and scales
Text attribute IDs that every text default list has, with styles and
runs: KeepFirstLines (0x1B3A), KeepLastLines (0x1B3B),
AllowArbitraryHyphenation (0x42C1), GridGyoudori (0x4264),
RotateSingleByteCharacters (0x4268), AutoTcy (0x4261),
ScaleAffectsLineHeight (0x42A3), ParagraphShadingOverprint (0x1BD4),
ParagraphBorderType (0x1BFD, a stroke type), RubyFont (0x4233) and
KentenFillColor (0x4257). The root style values for them are dropped
from root_values.xml, which keeps only values the converter does not
read.

PageItemDefault gets GradientFillAngle, GradientStrokeAngle,
Nonprinting and the two arrowhead scales from the page item defaults
list, and the line end code 0x5A0C is SquareSolidArrowHead. Evidence
in attributes.md and preferences.md.

compare.py --exclude own/, trustworthy pairs: +15,104 values for the
text attributes (TextDefault 1,251 of 1,251 for each, paragraph and
character styles and 1,562 text ranges), +5,737 for PageItemDefault
(RightLineEnd 1,247 -> 1,251 of 1,251); 0 lost, no extra value.
2026-10-10 09:05:14 +00:00
aiongg cbf12fbed2 feat: write user composite fonts and the paragraph border gap colour
Every composite font is written, in UID order. Chunk 0xCB02 is read as
four flagged strings, a u32, a u16 and the entry list, which ends the
chunk; the count search remains for other layouts (it took a wrong
position in one 12.1 document). Entries get RelativeSize and
BaselineShift (the first two f64), HorizontalScale and VerticalScale,
Locked from the u16 after the numbers (204 false), and no
CustomCharacters on the first entry of each font, the base font (1,434
of 1,434). Text attribute 0x1BFA is ParagraphBorderGapColor, 0 being
Swatch/None. Evidence in fonts.md and attributes.md.

compare.py --exclude own/, trustworthy pairs: 97.84 % -> 97.91 %
(+17,964 values, 0 lost on any key); CompositeFontEntry 7,306 -> 8,589
of 8,589 elements (AppliedFont 8,553: one document whose IDML names its
families in English), CompositeFont 1,434 of 1,434, TextRange
PSR.P.ParagraphBorderGapColor 0 -> 2,745 of 2,745. Extras 93,569 ->
93,520: the 49 CustomCharacters extras are gone.
2026-10-10 05:47:59 +00:00
aiongg b2cf1e2a2f fix: write percentages with every digit of the product
IDML writes a fraction attribute (HorizontalScale, VerticalScale,
AutoLeading, the spacing and glyph scaling attributes, RubyXScale,
KentenXScale) as the stored value times 100 with its binary noise, for
example 112.99999999999999. Rounding to 9 decimals matched none of the
24,055 reference values with more than 9 decimals in the trustworthy
pairs; the full product matches 23,910, and the exact matches among the
shorter values stay the same (140,887 of 142,524). Evidence in
attributes.md, percentages.

compare.py compares numbers to 6 significant digits, so its counts do
not change.
2026-10-10 05:47:35 +00:00
aiongg 1c5fa7fb58 feat: write page item stroke attributes, stroke types and drop shadow offsets
Page items get StrokeTint, GapColor, GapTint, EndCap, EndJoin, the line
ends and ArrowHeadAlignment from their attribute list (the IDs of object
styles), by the rule of the fill and stroke colour: the stored or base
value where it differs from the object style's, every value where the
style turns the category off, every value without a style. A stored tint
of 100 is written as -1 and differs from a style value of -1. Items
without a style refer to AppliedObjectStyle="n". New codes: stroke types
Dashed, Canned Dashed 4x4, Wavy, Straight Hash, Right Slant Hash, White
Diamond, ThinThick, ThickThin, ThickThinThick (one table for every list,
with the former cell-only codes), EndCap 2, EndJoin 2, four line ends and
StrokeAlignment 2 (OutsideAlignment). StrokeType and StrokeAlignment are
compared with the style too. Drop shadows get BlendMode (0x1081F),
Opacity (0x1081E), XOffset (0x1081B), YOffset (0x1081C) and Spread
(0x1084A); transparency values are compared with the style's in every
digit. Evidence in attributes.md and transparency.md.

compare.py --exclude own/, trustworthy pairs: 97.47 % -> 97.60 %
(+36,947 values, 0 lost on any key); for example GraphicLine EndCap
0 -> 5,346 of 5,346, Polygon StrokeTint 0 -> 4,352 of 4,352,
GraphicLine StrokeType 445 -> 3,715 of 3,720, DropShadowSetting XOffset
and YOffset 0 -> 580 of 580 each. Extras 94,233 -> 94,157: the 77
StrokeType and StrokeAlignment extras are gone; one polygon that stores
StrokeTint 100 has none in IDML.
2026-10-10 05:47:29 +00:00
aiongg 10c0d36d88 feat: decode settings that vary in the larger corpus
Keys that the regeneration dropped because a few documents differ are
read from the INDD instead (evidence in objects.md and attributes.md):

- Spread PageTransitionType and PageTransitionDirection: chunk 0x2050C
  (five transition codes, four direction codes; none without it).
- Object style StrokeTint, GapColor, EndCap, EndJoin, LeftLineEnd,
  RightLineEnd and ArrowHeadAlignment: page item attribute IDs 0x6E66,
  0x6E89, 0x6E6B, 0x6E6C, 0x6E71, 0x6E72 and 0x6E84 of the style's list.
- Paragraph and character style PreviewColor: the u32 14 bytes before
  the name, 0 or an interface colour.
- Object style ApplyNextParagraphStyle (chunk 0x1B94D),
  KeyboardShortcut "0 0" (key 0 after the name in chunk 0x1B907),
  ApplyToMasterPageOnly (wrap chunk u16 at 40), and
  UseNoLineBreaksForAutoSizing (chunk 0x1B924 u16 at 140).
- AnchorXoffset and HorizontalReferencePoint of anchored object
  settings (chunk 0x2800, f64 at 16 and u16 at 42), for object styles,
  anchored frames and the preferences.

compare.py --exclude own/, trustworthy pairs: +58,048 values, 0 lost on
any key; Spread transitions 0 -> 9,509 of 9,509 each, CharacterStyle
PreviewColor 0 -> 3,154 of 3,154, the object style keys 5,550 to 5,556
of 5,556 (KeyboardShortcut 4,262 of 4,305: other keys left out).
Extras 94,249 -> 94,233.
2026-10-10 03:02:20 +00:00
aiongg 8ce6c388e7 feat: write the frame baseline grid and footnote options and the document frame defaults
Text frames get BaselineFrameGridOption from chunk 0x2834 of their
multi-column frame, and TextFrameFootnoteOptionsObject from DOM 12, both
by the category rule of TextFramePreference (all values when the
category is off or the frame has no style, else the values that differ
from the style's). FootnotesSpanAcrossColumns comes from chunk 0x22608
u16 at 2. Frames without chunk 0x2CE, or with the 22-byte chunk of 7.0,
now get their TextFramePreference. Object styles write their baseline
grid from chunk 0x1B924 at 82 (code 1 is TopOfMargin). The document's
TextFramePreference reads the column rule and footnote values of the
preferences chunks 0x22646 and 0x22608.

The 13.1 boundary of the Footnotes... values and of
MergeConsecutiveParaBorders counts as reached when the header or the
last session of the save history is 13.1: 109 pairs whose header says
13.0 have them, 93 of which a 13.1 session saved last. Evidence and
re-checked counts in objects.md, footnotes.md and idml-values.md.

compare.py --exclude own/, trustworthy pairs: +48,405 values (+43,158
for the elements, +5,247 for the 13.1 rule), 0 lost on any key.
TextFrameFootnoteOptionsObject 17,002 -> 20,096 of 20,096 on written
frames; BaselineFrameGridOption 0 -> 1,961 of 1,961; TextFramePreference
elements 48,038 -> 48,708; document column rule 0 -> 576 of 576.
Extras: the 82 FootnotesSpanAcrossColumns values are gone, 3
EnableOverrides values are new.
2026-10-10 03:01:34 +00:00
aiongg 05548275df fix: write the NextFrame and NextOddPage paragraph break types
ParagraphBreakType (0x1B6A) codes 3 and 4 are NextFrame and NextOddPage,
the codes of StartParagraph. Aligned with the character ranges of 112
pairs whose IDML has a break type other than Anywhere: 76 NextFrame
ranges in 19 trustworthy documents and 5 NextOddPage ranges in one, with
no contradiction. A chapter break that starts on an odd page now keeps
that break.

compare.py --exclude own/, trustworthy pairs: CSR.ParagraphBreakType
787 -> 847 of 847 (all pairs 869 -> 929 of 929); no extra value.
2026-10-10 03:00:45 +00:00
aiongg 7085facf9d feat: write fill, stroke and corner values that items take from the base list
Every document has one object of class 0x6E02 whose chunk 0x6E03 is a
page item attribute list. An item that does not store a fill, stroke or
corner attribute has the value of this list; IDML writes it where it
differs from the object style's effective value. When the object style
turns the attribute's category off, IDML writes the item's value even
where it equals the style's (EnableFill: fill; EnableStroke: stroke
colour; EnableStrokeAndCornerOptions: the other stroke and corner
attributes). This replaces StrokeWeight="1" for items with [None]: the
base list has 0.2835 in 125 of 606 trustworthy documents, which
explains the 0.1 mm stroke weights, and corner radii of 14.1732 in the
same documents. Groups are left out; EPS text takes no corner values.
Evidence in attributes.md.

compare.py --exclude own/, trustworthy pairs: coverage 98.41 % ->
98.53 % (StrokeColor of rectangles, text frames, ovals, polygons and
lines 3,964 missing -> 4; StrokeWeight 256 wrong and 200 missing -> 0;
corner radii and options about 10,000 missing -> 24; fill, miter and
category-off values), documents >= 99 % 268 -> 278; all pairs 96.54 %
-> 96.65 %. Extras unchanged on trustworthy pairs (8,968); over all
pairs +93: 4 StrokeWeight values in 3 stale pairs and attributes of
items the reference does not have. No new failures.
2026-10-09 19:33:37 +00:00
aiongg c43a16815b feat: write custom mojikumi tables
Read class 0x4203 (name in chunk 0x100B, settings in chunk 0x420A) and
write each as a MojikumiTable with BasedOnMojikumiSet and its
OverrideMojikumiAkiList, together with the built-in mojikumi tables in
UID order. Mojikumi references to these tables become
MojikumiTable/<name> objects. Evidence in objects.md: 185 of 185 tables
and 62,439 of 62,439 entries over all pairs.

compare.py --exclude own/, trustworthy pairs: coverage 98.09 % ->
98.10 % (+1,193 values: 97 tables, 576 paragraph ranges, 105 paragraph
styles, 94 cell ranges, 19 story ranges, 11 text defaults); all pairs
96.23 % -> 96.24 %. No wrong values, extras unchanged (8,968), no new
failures or warnings, schema failures 0 on pairs.

diff_outputs.py: 132 outputs differ, all files with custom mojikumi
tables (designmap.xml, and the styles and stories that refer to them).
2026-10-08 16:09:58 +00:00
aiongg 53fff7650f feat: write ruby, kenten and warichu attributes
Map 14 more text attribute IDs (ruby alignment, spacing, overhang,
position, offset, scaling, auto align, tate-chu-yoko digits, X scales,
font styles; warichu on/off, lines, size, line spacing, alignment), add
KinsokuHangType code 1 and KentenKind code 5, and skip the ruby strand
(run kind 0x420D), a copy that IDML does not use. Evidence in
attributes.md and objects.md.

compare.py --exclude own/, trustworthy pairs: coverage 98.07 % ->
98.09 % (+3,312 values), documents >= 99 % 176 -> 179; all pairs
96.21 % -> 96.23 %. No wrong values among the new ones, extras
unchanged (8,968), no new failures, schema failures 0 on pairs.

diff_outputs.py: 4,433 outputs differ. In 4,083 only the order of
attributes changes: root styles and text defaults now take these values
from the INDD instead of the observed values. The other 350 gain the
attributes on ranges and styles.
2026-10-08 15:50:08 +00:00
aiongg c98436d3b2 docs: note the KerningMethod runs the new codes do not explain 2026-10-08 08:03:17 +00:00
aiongg af9f21700a feat: add the text enumeration codes found in the corpus
New codes for Position, Justification, Composer, KerningMethod,
ParagraphBreakType, StartParagraph, OTFFigureStyle, SpanColumnType and
BulletsAndNumberingListType, each found by aligning INDD runs with IDML
ranges and styles by name; no run or style contradicts them.

compare.py --exclude own/:
- trustworthy value coverage 98.01% -> 98.03% (+1,859 values); all
  pairs 96.10% -> 96.12% (+2,700)
- extra values: trustworthy unchanged; all pairs +13 (stale pairs)
- no key lost values
2026-10-08 08:03:04 +00:00
aiongg 4633fdeec5 feat: write 90 more paragraph and character attributes
Hyphenation, glyph and word spacing, keeps, rules above, underline and
strikethrough types, colours and tints, numbering format, alignment and
level, paragraph and character direction, OpenType features, CJK
settings (aki, kinsoku, ruby, kenten) and paragraph border and shading
widths, offsets and weights. Each ID is present on a style exactly when
the IDML style has the attribute. Rule, underline and strikethrough
stroke types are a reference and a built-in code (new layout
RefOrCode); NumberingFormat is written as a string.
MergeConsecutiveParaBorders is written from version 13.1, as in IDML.

compare.py --exclude own/:
- trustworthy value coverage 97.66% -> 98.01% (+41,082 values); all
  pairs 95.64% -> 96.10% (+74,262)
- of 121,196 values of these attributes, 120,409 reproduced and 3 wrong
  (all 3 were wrong before)
- extra values: trustworthy unchanged; all pairs +218 (ranges and
  styles of stale pairs that their IDML lacks)
- compare.py --all with schemas: 0 schema failures on pairs; files
  without a reference as before
2026-10-08 07:58:48 +00:00
aiongg cd7116ff8d feat: read the numbering lists and AppliedNumberingList
Preferences chunk 0x1A49B lists the default numbering list and the
others; each list (class 0x1A483) has its name and two flags in chunk
0x1A49A. The converter writes every list in designmap.xml, the default
first, in place of the constant default list, which it keeps only for a
file whose lists it cannot read. Paragraph attribute 0x1A417
(AppliedNumberingList) names a list by UID.

compare.py --exclude own/:
- trustworthy value coverage 97.65% -> 97.66% (+896 values); all pairs
  95.63% -> 95.64% (+1,231)
- NumberingList 705 of 705 (216 more), AppliedNumberingList +32
- extra values unchanged; no key lost values
- diff_outputs.py: other outputs differ only in the position of the
  AppliedNumberingList property
2026-10-08 07:38:55 +00:00
aiongg 09e87fadea feat: write page item values only where they differ from the object style
IDML leaves out the values of a page item that equal those of its
applied object style. The writer now compares with the style's
effective values (its own, then the styles it is based on, then [None]):

- TextFramePreference: an attribute is written when its category is off
  in the style's category list (chunk 0x1B92E, also for [None]) or its
  value differs; TextColumnMaxWidth (DOM 8), TextColumnCount (DOM 10)
  and InsetSpacing (DOM 11) are always written; footnote values from
  13.1 (objects.md, text frame preferences).
- Fill, stroke, miter and corner attributes (attributes.md).
- Transparency effects: only differing values, and an effect element
  only when it has one or its opacity stops differ (transparency.md).

New decoding: object style chunk 0x1B924 fields for balance, fixed
width, justification, first baseline offset (code 4 = XHeight, also for
frames) and auto-sizing; chunk 0x1B92C (style transparency). Object
styles get the DOM 12 text frame values from DOM 8 and
FootnotesEnableOverrides from 13.1 (idml-values.md).
2026-10-07 22:19:20 +00:00
aiongg 17c6ace935 feat: leave out values IDML does not write (layers, root styles, version gates)
Rules from the corpus, each documented in docs/format/:

- ItemLayer only on items directly under a spread (objects.md).
- The root object style [None] gets no Enable… attributes and no effects
  category settings; EnableTextFrameColumnRuleOptions from 15.1, and the
  footnote values of an object style's TextFramePreference from 13.1.
- The root paragraph style has no NextStyle and no AllNestedStyles;
  TextDefault has AllNestedStyles only when the list has items; the
  empty TabList is written from DOM 8 (attributes.md).
- DOM 7 has no EPubExportPreference or HTMLExportPreference.
- Row and column Self use a hexadecimal index (tables.md).
- Cell CellType from DOM 11; Document Name from DOM 13; ColorGroup Self
  is the UID before 11.3.
- The internal layer is the first of the document's layer list, whatever
  its name.
- A CR in a name is %0d in Self (colours, gradients, tints, hyperlink
  destinations, styles).

compare.py, trustworthy pairs (after the compare fix of 48d184f):
extra values 705,523 -> 635,511; value coverage 92.25 % -> 92.41 %
(10,296,599 values); 2 ItemLayer values lost (the 2 grouped items whose
IDML has one); 12 documents >= 99 %. No conversion or schema failures.
2026-10-07 22:01:28 +00:00
aiongg 6511128e7f feat: write per-corner attributes and paragraph border and shading corners
Page items, object styles and PageItemDefault: each corner radius and
corner option from its own attribute ID (top left 0x6E70/0x6E6F, top
right 0x6E94/0x6E91, bottom left 0x6E92/0x6E8F, bottom right
0x6E93/0x6E90), with the corner codes InsetCorner, BevelCorner and
FancyCorner. Object styles no longer need all four corners equal.

Paragraph styles and text: ParagraphShadingTopLeft/BottomLeftCornerRadius
(0x1DF12, 0x1DF14); the tied groups of border corner radii, shading
right corner radii and shading corner options when their IDs agree; the
shading and border origin pairs for the known code pairs.

compare.py --all --exclude own/ (trustworthy pairs): value coverage
91.61% -> 92.25% (+71,545 values); documents >= 99 %: 5 -> 11; median
95.7% -> 96.3%; no key lower. Extra values 709,654 -> 718,266
(+8,612): the per-corner attributes follow the presence of CornerRadius
and CornerOption in the item's list, so each of the existing 2,055
extra CornerRadius values (items whose IDML leaves the value to the
object style) now has four per-corner extras, and likewise the
CornerOption extras. 0 conversion and 0 schema failures.
2026-10-07 21:26:29 +00:00
aiongg f314de906d docs: fix stale attribute notes and misplaced doc comments 2026-10-07 20:00:23 +00:00
aiongg d205f6c851 fix: one corner option map for page items, defaults and object styles
Page items and page item defaults knew only code 0x5A15; object styles
also knew 0 (None) and 0x5A16 (InverseRoundedCorner). Using the object
style codes everywhere reproduces 486 more reference values in the
trustworthy pairs (489 of 489 page item defaults, 4 rectangles, 2 text
frames) and adds no extra values. Object styles write CornerOption in
the page item attribute order.
2026-10-07 19:50:06 +00:00
aiongg 7a157a5abc feat: convert kinsoku set, mojikumi, ideographic space and diacritic position 2026-10-07 17:05:51 +00:00
aiongg e21d73aa0a docs: never commit downloaded sample files 2026-10-07 05:35:59 +00:00
aiongg fe0a20fc0e feat: convert tate-chu-yoko (Tatechuyoko) 2026-10-07 05:34:59 +00:00
aiongg 24c959bf94 feat: convert manual kerning (KerningValue) 2026-10-07 05:29:41 +00:00
aiongg 4bf1094489 feat: convert ruby text
Character runs that set attribute 0x422D to 1 carry their ruby text in
0x422E (u32 length, then text segments). In a vertically typeset
sample's print PDF that text is set small beside the run's characters.
The converter writes RubyFlag and RubyString.
2026-10-07 04:31:04 +00:00
aiongg ccda8898e9 feat: convert page item transparency: opacity, blend mode and effects 2026-10-06 23:55:15 +00:00
aiongg 4014eea106 feat: write font families and fonts in Fonts.xml
Read the font records of class 0x3E03 (chunk 0x3E05) and the Typekit IDs
(chunk 0x3EEB), and write FontFamily and Font elements. Evidence and the
fields left out are in docs/format/fonts.md.
2026-10-06 22:55:45 +00:00
aiongg 3490507fbf feat: convert stroke type and stroke alignment
Decode page item attribute 0x6E6E (a reference followed by a built-in
stroke style code) as StrokeType and 0x6E8C as StrokeAlignment, with
evidence from items and from object style attribute lists. Write the 18
built-in stroke styles every exported IDML lists.
2026-10-06 22:28:29 +00:00
aiongg 36b7ae9eaf feat: write root style values that every exported IDML has
Collect the root style attributes, Properties and child elements that are
the same in every corpus IDML (tools/root_values.py) and write them on the
root paragraph, character, object, cell and table styles. Values read from
the INDD take precedence; values that first appear after DOM 7 are gated
by InDesign version. Also write the default numbering list, and write a
style only once when two style objects share a name.
2026-10-06 22:04:05 +00:00
aiongg 327eaee967 docs: state nested-style evidence in general terms; stop tracking __pycache__ 2026-10-06 21:15:29 +00:00
aiongg d5d2e1451e feat: convert keep lines, nested styles, tab stops, languages and more text attributes
Adds KeepLinesTogether, AllNestedStyles, TabList, AppliedLanguage,
RightIndent, BaselineShift, VerticalScale, NoBreak, OTFFigureStyle,
Position, SingleWordJustification, ParagraphBreakType, rule above
indents and width, RuleBelow and its colour, span columns, paragraph
shading and border on/colour/top/bottom offsets, SameParaStyleSpacing,
grid alignment, text gradient fill, EndJoin, and bullet and numbering
attributes. Four-byte values of numeric attributes are now written,
which fixes DropcapDetail. Evidence is in docs/format/attributes.md.
2026-10-06 21:14:52 +00:00
aiongg 6475d01841 docs: describe evidence from the non-public sample in general terms 2026-10-06 20:31:49 +00:00
aiongg e1acc98fa8 feat: convert start paragraph, drop caps, letter spacing and first baseline offset
Map paragraph attributes 0x1B37 (StartParagraph), 0x1B0D and 0x1B0E
(drop cap characters and lines), 0x1B31 and 0x1B32 (maximum and minimum
letter spacing), and the text frame's first baseline offset code in
chunk 0x2CE. Evidence is recorded in docs/format.
2026-10-06 20:30:55 +00:00
aiongg 18206fca5b feat: convert small caps, jump and bounding-box wrap, and Roman page numbers
Capitalization codes 1 (SmallCaps) and 3 (CapToSmallCap), text wrap
modes 1 (JumpObjectTextWrap) and 3 (BoundingBoxTextWrap) with offsets
stored as left, top, right, bottom, and page number style 0x4C17
(LowerRoman) with Roman page names. Evidence in docs/format.
2026-10-06 19:51:56 +00:00
aiongg 12611569cf docs: note capitalization codes without IDML evidence 2026-10-06 18:56:13 +00:00
aiongg 534e37549a feat: convert gradients and corner and gradient item attributes
Read gradient swatches (stops, locations, midpoints, type) and write them
to Graphic.xml after the swatches, as the schema requires. Write
CornerOption, CornerRadius and gradient start and length on page items.
Decode unknown 4-byte attribute values as numbers.
2026-10-06 17:43:37 +00:00
aiongg 5f87710d92 feat: convert text formatting
Parse attribute lists in style objects and in paragraph and character
style runs, and write 40 text attributes (font, style, size, leading,
colour, tracking, kerning method, indents, spacing, justification,
underline, rules, hyphenation and more) on styles and text ranges. Read
font family names.

tools/compare.py now also compares text range attributes at matching text
offsets; every mapped attribute matches the reference in all ranges.
2026-10-06 16:33:53 +00:00
aiongg 0e20d76f2a feat: convert colours, fill and stroke, and style hierarchy
Decode colour swatches (name, model, space, values, override, flags) and
the None swatch, and write them to Graphic.xml. Parse attribute lists and
write page item fill colour and tint, stroke colour and weight, and miter
limit. Write BasedOn of root styles as a string, as IDML does. Write forced
line breaks as U+2028 and keep surrogate pairs intact across text runs.

Document the object, chunk and attribute formats with their evidence.
2026-10-06 16:25:07 +00:00