mirror of
https://github.com/storytold/indd-utils.git
synced 2026-11-19 08:40:46 +01:00
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.
This commit is contained in:
1 parent
1a2ce02c4f
commit
d7bc060fd4
8 files changed
+111
-27
No files matched your search
@@ -229,7 +229,8 @@ Line end codes (u32): 0 `None`, 0x5A03 `SimpleArrowHead` (1 item),
|
||||
0x5A04 `SimpleWideArrowHead` (110 items in 5 files), 0x5A05
|
||||
`TriangleArrowHead` (44 in 8), 0x5A06 `TriangleWideArrowHead`, 0x5A07
|
||||
`BarbedArrowHead` (64 in 6), 0x5A08 `CurvedArrowHead`, 0x5A09
|
||||
`CircleArrowHead`, 0x5A0A `CircleSolidArrowHead` and 0x5A0D
|
||||
`CircleArrowHead`, 0x5A0A `CircleSolidArrowHead`, 0x5A0C
|
||||
`SquareSolidArrowHead` (the page item defaults of 5 files) and 0x5A0D
|
||||
`BarArrowHead`. `EndCap` 2 occurs on 4 items in 3 files, `EndJoin` 2 on
|
||||
6 items in 1 file. One line in the pairs before 2026-10 has 0x6E71 =
|
||||
0x5A08 and 0x6E72 = 0x5A0D with `LeftLineEnd="CurvedArrowHead"` and
|
||||
@@ -276,9 +277,11 @@ with the same table (`preferences.md`).
|
||||
|
||||
**Not identified.** `LeftArrowHeadScale` and `RightArrowHeadScale` are
|
||||
100 in every object style and in every `PageItemDefault` but one, as are
|
||||
0x6E95 and 0x6E96, so the two IDs cannot be told apart; the converter
|
||||
writes them from the value files on object styles only. 0x6E78 is 0 in
|
||||
every style, 0x6E73 in all but 2. 0x6E67, 0x6E6A and 0x6E8B are the
|
||||
0x6E95 and 0x6E96, so the two IDs cannot be told apart. The converter
|
||||
writes them from the value files on object styles, and from the IDs in
|
||||
their order on `PageItemDefault`, where the values are equal in every
|
||||
file (`preferences.md`, page item defaults). 0x6E78 is 0 in every style,
|
||||
0x6E73 in all but 2; 0x6E78 is `Nonprinting` of `PageItemDefault`. 0x6E67, 0x6E6A and 0x6E8B are the
|
||||
overprint flags (`objects.md`, object style settings).
|
||||
`StrokeCornerAdjustment` and `StrokeDashAndGap` do not occur in the
|
||||
corpus IDML files.
|
||||
@@ -821,6 +824,36 @@ not listed leaves the attribute out.
|
||||
| 0x1BD5 | `ParagraphShadingWidth` | 0 `ColumnWidth`, 1 `TextWidth` | 386 (6) |
|
||||
| 0x1BD7 | `ParagraphShadingClipToFrame` | bool | 388 (8) |
|
||||
|
||||
**Found in the corpus of 2026-10.** These IDs are in every text default
|
||||
list (chunk 0x23F of the preferences, 1,460 of 1,460 files, no
|
||||
contradiction) and in styles and runs. Counts are the converter's
|
||||
output over the 1,251 trustworthy pairs, all reproduced, with no extra
|
||||
value:
|
||||
|
||||
| ID | IDML | Encoding | Text defaults; styles; ranges |
|
||||
|---|---|---|---|
|
||||
| 0x1B3A | `KeepFirstLines` | num | 1,251; 1,258 paragraph styles |
|
||||
| 0x1B3B | `KeepLastLines` | num | 1,251; 1,258 paragraph styles |
|
||||
| 0x42C1 | `AllowArbitraryHyphenation` | bool | 1,251; 1,270; 30 |
|
||||
| 0x4264 | `GridGyoudori` | num | 1,251; 1,323; 80 |
|
||||
| 0x4268 | `RotateSingleByteCharacters` | bool | 1,251; 1,277; 329 |
|
||||
| 0x4261 | `AutoTcy` | num | 1,251; 1,285; 241 |
|
||||
| 0x42A3 | `ScaleAffectsLineHeight` | bool | 1,251; 1,359 paragraph and character styles; 879 |
|
||||
| 0x1BD4 | `ParagraphShadingOverprint` | bool | 1,032; 1,033 |
|
||||
| 0x1BFD | `ParagraphBorderType` (Properties) | stroke type | 918; 919 |
|
||||
| 0x4233 | `RubyFont` (Properties) | u32 font family UID; 0 is `$ID/` (as `BulletsFont`) | 1,251; 1,255; 23 |
|
||||
| 0x4257 | `KentenFillColor` (Properties) | swatch | 1,251; 1,262; 23 |
|
||||
|
||||
`KeepFirstLines` and `KeepLastLines` are equal in every list (2 in all
|
||||
but one file, 1 in that one), also in every paragraph style that has
|
||||
them, so which ID is which is assumed from their order. 0x1BD4 is told
|
||||
from 0x1BD8 by one document whose shading is overprinted (0x1BD4 1,
|
||||
0x1BD8 0). 0x4233 and 0x4257 are told apart in the one document that
|
||||
sets them by the class of the stored UID: a font family (class 0x3E03)
|
||||
and a colour. `ParagraphBorderType` uses the stroke type codes of page
|
||||
items: 0x5A29 `Solid` in 1,042 files, 0x5A3F `Japanese Dots` in one.
|
||||
0x1BD4 and 0x1BFD are absent exactly where IDML has no attribute.
|
||||
|
||||
`MergeConsecutiveParaBorders` is in IDML from version 13.1 (in none of
|
||||
the 3 trustworthy pairs of version 13.0, in all 46 of 13.1); the
|
||||
converter writes it when the header or the last session of the save
|
||||
|
||||
@@ -42,11 +42,11 @@ InDesign version or later (`MinimumVersion` in the file).
|
||||
|
||||
| Root style | Values | Same in | Written for version |
|
||||
|---|---|---|---|
|
||||
| `[No paragraph style]` | 81 | 1,448 of 1,448 files | all |
|
||||
| `[No paragraph style]` | 72 | 1,448 of 1,448 files | all |
|
||||
| | 1 | 1,437 of 1,437 files with DOM 8 or later | 8 and later |
|
||||
| | 3 | 1,331 of 1,331 (DOM 10 or later) | 10 and later |
|
||||
| | 4 | 1,211 of 1,211 (DOM 11 or later) | 11 and later |
|
||||
| | 16 | 1,039 of 1,039 (DOM 13 or later) | 13 and later |
|
||||
| | 3 | 1,211 of 1,211 (DOM 11 or later) | 11 and later |
|
||||
| | 14 | 1,039 of 1,039 (DOM 13 or later) | 13 and later |
|
||||
| | 1 | 640 of 640 (DOM 15 or later) | 15 and later |
|
||||
| | 1 | 61 of 61 (DOM 21) | 21 |
|
||||
| `[No character style]` | 1 | 1,448 of 1,448 | all |
|
||||
@@ -92,7 +92,7 @@ pair rule leaves them out: an IDML (DOM 7) beside an INDD of version
|
||||
17.2 that has no root styles at all, and a big-endian pair of version 11.2 whose table style lacks
|
||||
four region cell style values that every other file has.
|
||||
|
||||
**Left out because the converter reads them from the INDD:** 205
|
||||
**Left out because the converter reads them from the INDD:** 217
|
||||
attributes of `[No paragraph style]`, listed in `attributes.md`. Some
|
||||
of these are also the same in every IDML; the INDD value is written.
|
||||
|
||||
|
||||
@@ -158,7 +158,13 @@ converter writes it as `TextDefault` with the same attribute table as
|
||||
styles. Over all pairs this reproduces 182,742 of 196,543 `TextDefault`
|
||||
values, against 159,982 from the observed values alone; no attribute
|
||||
reproduced before is lost. As for paragraph styles, `KerningValue` is
|
||||
left out: the schema does not allow it there.
|
||||
left out: the schema does not allow it there. The IDs of `KeepFirstLines`,
|
||||
`ParagraphBorderType`, `RubyFont` and the others found in the corpus of
|
||||
2026-10 are in every list where IDML has the attribute
|
||||
(`attributes.md`, more paragraph and character attributes): each is
|
||||
reproduced in 1,251 of 1,251 trustworthy pairs (`ParagraphBorderType`
|
||||
918 of 918 and `ParagraphShadingOverprint` 1,032 of 1,032, the pairs
|
||||
whose IDML has them).
|
||||
|
||||
## Text (`TextPreference`, `TextFramePreference`)
|
||||
|
||||
@@ -299,8 +305,25 @@ pairs: `AutoFit` absent and `false` in 1,324, `FittingOnEmptyFrame`
|
||||
The page item attributes of the list also give the stroke attributes of
|
||||
`PageItemDefault` (`attributes.md`, strokes): `StrokeTint`, `GapColor`,
|
||||
`GapTint`, `EndCap`, `EndJoin`, the line ends and `ArrowHeadAlignment`,
|
||||
each reproduced in every trustworthy pair whose IDML has it, except 4
|
||||
`RightLineEnd` values (a line end code not identified).
|
||||
each reproduced in every trustworthy pair whose IDML has it.
|
||||
|
||||
The list has five more IDs that `PageItemDefault` has (1,460 of 1,460
|
||||
files; values over all pairs):
|
||||
|
||||
| ID | Attribute | Values |
|
||||
|---|---|---|
|
||||
| 0x551E | `GradientFillAngle` | f64; 90 in 5 files |
|
||||
| 0x5524 | `GradientStrokeAngle` | f64; 90 in 4 files |
|
||||
| 0x6E78 | `Nonprinting` | u16 bool; `true` in 1 file |
|
||||
| 0x6E95, 0x6E96 | `LeftArrowHeadScale`, `RightArrowHeadScale` | f64; 100, and 80 in one file (both) |
|
||||
|
||||
The two gradient angles are told apart by one file with fill angle 90
|
||||
and stroke angle 0. The two arrowhead scales are equal in every file, so
|
||||
which ID is which is assumed from their order; the IDs are in the list
|
||||
exactly where IDML has the attributes (1,159 files, from version 12.0
|
||||
on). The line end code 0x5A0C is `SquareSolidArrowHead` (5 files). The
|
||||
overprint IDs 0x6E67, 0x6E6A and 0x6E8B are 0 in every list, but IDML
|
||||
has the attributes in only 16 and 12 files, so they are not written.
|
||||
|
||||
## Print settings (`PrintPreference`, `PrintBookletPrintPreference`)
|
||||
|
||||
|
||||
@@ -796,6 +796,22 @@ pub(super) const TEXT_ATTRS: &[(u32, &str, Kind, bool)] = &[
|
||||
false,
|
||||
),
|
||||
(0x1BD7, "ParagraphShadingClipToFrame", Kind::Bool, false),
|
||||
(0x1BD4, "ParagraphShadingOverprint", Kind::Bool, false),
|
||||
(
|
||||
0x1BFD,
|
||||
"ParagraphBorderType",
|
||||
Kind::Builtin("StrokeStyle/$ID/", STROKE_TYPES),
|
||||
true,
|
||||
),
|
||||
(0x1B3A, "KeepFirstLines", Kind::Number, false),
|
||||
(0x1B3B, "KeepLastLines", Kind::Number, false),
|
||||
(0x42C1, "AllowArbitraryHyphenation", Kind::Bool, false),
|
||||
(0x4264, "GridGyoudori", Kind::Number, false),
|
||||
(0x4268, "RotateSingleByteCharacters", Kind::Bool, false),
|
||||
(0x4261, "AutoTcy", Kind::Number, false),
|
||||
(0x42A3, "ScaleAffectsLineHeight", Kind::Bool, false),
|
||||
(0x4233, "RubyFont", Kind::FontOrNone, true),
|
||||
(0x4257, "KentenFillColor", Kind::SwatchOrText, true),
|
||||
];
|
||||
|
||||
/// Paragraph shading corner option codes.
|
||||
@@ -972,9 +988,20 @@ const LINE_ENDS: &[(u32, &str)] = &[
|
||||
(0x5A08, "CurvedArrowHead"),
|
||||
(0x5A09, "CircleArrowHead"),
|
||||
(0x5A0A, "CircleSolidArrowHead"),
|
||||
(0x5A0C, "SquareSolidArrowHead"),
|
||||
(0x5A0D, "BarArrowHead"),
|
||||
];
|
||||
|
||||
/// Attributes of `PageItemDefault` beyond the page item table
|
||||
/// (`docs/format/preferences.md`, page item defaults).
|
||||
pub(super) const ITEM_DEFAULT_ATTRS: &[(u32, &str, Kind)] = &[
|
||||
(0x551E, "GradientFillAngle", Kind::Number),
|
||||
(0x5524, "GradientStrokeAngle", Kind::Number),
|
||||
(0x6E78, "Nonprinting", Kind::Bool),
|
||||
(0x6E95, "LeftArrowHeadScale", Kind::Number),
|
||||
(0x6E96, "RightArrowHeadScale", Kind::Number),
|
||||
];
|
||||
|
||||
/// Gradient attributes every page item has: attribute-list ID (0 for
|
||||
/// none, `GradientStroke...` of groups), IDML name, value without the
|
||||
/// attribute. Fill and stroke start and length are in `ITEM_ATTRS`. See
|
||||
@@ -1483,6 +1510,13 @@ impl Writer<'_> {
|
||||
self.attr_values(attrs, ITEM_ATTRS)
|
||||
}
|
||||
|
||||
/// IDML attributes of the page item defaults list.
|
||||
pub(super) fn item_default_values(&self, attrs: &Attrs) -> Vec<(&'static str, String)> {
|
||||
let mut out = self.attr_values(attrs, ITEM_ATTRS);
|
||||
out.extend(self.attr_values(attrs, ITEM_DEFAULT_ATTRS));
|
||||
out
|
||||
}
|
||||
|
||||
/// IDML attributes of a table or (`style`) table style attribute
|
||||
/// list.
|
||||
pub(super) fn table_attrs(&self, attrs: &Attrs, style: bool) -> Vec<(&'static str, String)> {
|
||||
|
||||
@@ -741,7 +741,7 @@ impl Writer<'_> {
|
||||
}
|
||||
if let Some(a) = &prefs.item_defaults {
|
||||
let i = ours_of(&mut ours, "PageItemDefault");
|
||||
let values = self.item_attr_values(a);
|
||||
let values = self.item_default_values(a);
|
||||
ours[i]
|
||||
.attrs
|
||||
.extend(values.into_iter().map(|(k, v)| (k.to_string(), v)));
|
||||
|
||||
@@ -8,15 +8,13 @@ tools/root_values.py; evidence in docs/format/idml-values.md.
|
||||
-->
|
||||
<RootStyleValues>
|
||||
<Values>
|
||||
<ParagraphStyle Imported="false" PageNumberType="AutoPageNumber" DesiredGlyphScaling="100" KeepFirstLines="2" KeepLastLines="2" StrokeTint="-1" OverprintStroke="false" GradientStrokeAngle="0" GradientStrokeLength="-1" GradientStrokeStart="0 0" RuleAboveOverprint="false" RuleBelowOverprint="false" OTFOrdinal="false" OTFFraction="false" RuleAboveGapOverprint="false" RuleBelowGapTint="-1" RuleBelowGapOverprint="false" OTFMark="true" OTFLocale="true" OTFSlashedZero="false" OTFHistorical="false" UnderlineGapTint="-1" StrikeThroughGapOverprint="false" StrikeThroughGapTint="-1" StrikeThroughOverprint="false" SplitColumnOutsideGutter="0" SpanColumnMinSpaceBefore="0" RubyYScale="100" RubyXOffset="0" RubyOverhang="false" RubyTint="-1" RubyOverprintFill="Auto" RubyStrokeTint="-1" RubyOverprintStroke="Auto" RubyWeight="-1" KentenYScale="100" KentenPlacement="0" KentenAlignment="AlignKentenCenter" KentenPosition="AboveRight" KentenCustomCharacter="" KentenCharacterSet="CharacterInput" KentenTint="-1" KentenOverprintFill="Auto" KentenStrokeTint="-1" KentenOverprintStroke="Auto" KentenWeight="-1" TatechuyokoXOffset="0" TatechuyokoYOffset="0" AutoTcy="0" AutoTcyIncludeRoman="false" Jidori="0" GridGyoudori="0" CharacterRotation="0" RotateSingleByteCharacters="false" ShataiMagnification="0" WarichuCharsBeforeBreak="2" WarichuCharsAfterBreak="2" OTFHVKana="false" OTFRomanItalics="false" ScaleAffectsLineHeight="false" ParagraphGyoudori="false" RubyAutoTcyAutoScale="true" AllowArbitraryHyphenation="false" NumberingStartAt="1" Kashidas="DefaultKashidas" XOffsetDiacritic="0" YOffsetDiacritic="0" OTFOverlapSwash="false" OTFStylisticAlternate="false" OTFJustificationAlternate="false" OTFStretchedAlternate="false" KeyboardDirection="DefaultDirection">
|
||||
<ParagraphStyle Imported="false" PageNumberType="AutoPageNumber" DesiredGlyphScaling="100" StrokeTint="-1" OverprintStroke="false" GradientStrokeAngle="0" GradientStrokeLength="-1" GradientStrokeStart="0 0" RuleAboveOverprint="false" RuleBelowOverprint="false" OTFOrdinal="false" OTFFraction="false" RuleAboveGapOverprint="false" RuleBelowGapTint="-1" RuleBelowGapOverprint="false" OTFMark="true" OTFLocale="true" OTFSlashedZero="false" OTFHistorical="false" UnderlineGapTint="-1" StrikeThroughGapOverprint="false" StrikeThroughGapTint="-1" StrikeThroughOverprint="false" SplitColumnOutsideGutter="0" SpanColumnMinSpaceBefore="0" RubyYScale="100" RubyXOffset="0" RubyOverhang="false" RubyTint="-1" RubyOverprintFill="Auto" RubyStrokeTint="-1" RubyOverprintStroke="Auto" RubyWeight="-1" KentenYScale="100" KentenPlacement="0" KentenAlignment="AlignKentenCenter" KentenPosition="AboveRight" KentenCustomCharacter="" KentenCharacterSet="CharacterInput" KentenTint="-1" KentenOverprintFill="Auto" KentenStrokeTint="-1" KentenOverprintStroke="Auto" KentenWeight="-1" TatechuyokoXOffset="0" TatechuyokoYOffset="0" AutoTcyIncludeRoman="false" Jidori="0" CharacterRotation="0" ShataiMagnification="0" WarichuCharsBeforeBreak="2" WarichuCharsAfterBreak="2" OTFHVKana="false" OTFRomanItalics="false" ParagraphGyoudori="false" RubyAutoTcyAutoScale="true" NumberingStartAt="1" Kashidas="DefaultKashidas" XOffsetDiacritic="0" YOffsetDiacritic="0" OTFOverlapSwash="false" OTFStylisticAlternate="false" OTFJustificationAlternate="false" OTFStretchedAlternate="false" KeyboardDirection="DefaultDirection">
|
||||
<Properties>
|
||||
<RuleBelowGapColor type="object">Swatch/None</RuleBelowGapColor>
|
||||
<StrikeThroughGapColor type="object">Swatch/None</StrikeThroughGapColor>
|
||||
<RubyFont type="string">$ID/</RubyFont>
|
||||
<RubyFill type="string">Text Color</RubyFill>
|
||||
<RubyStroke type="string">Text Color</RubyStroke>
|
||||
<KentenFont type="string">$ID/</KentenFont>
|
||||
<KentenFillColor type="string">Text Color</KentenFillColor>
|
||||
<KentenStrokeColor type="string">Text Color</KentenStrokeColor>
|
||||
<NumberingRestartPolicies RestartPolicy="AnyPreviousLevel" LowerLevel="0" UpperLevel="0" />
|
||||
</Properties>
|
||||
@@ -65,7 +63,7 @@ tools/root_values.py; evidence in docs/format/idml-values.md.
|
||||
</ObjectStyle>
|
||||
</Values>
|
||||
<Values MinimumVersion="11">
|
||||
<ParagraphStyle SplitDocument="false" EmitCss="true" ParagraphShadingOverprint="false" ParagraphShadingSuppressPrinting="false" />
|
||||
<ParagraphStyle SplitDocument="false" EmitCss="true" ParagraphShadingSuppressPrinting="false" />
|
||||
<CharacterStyle SplitDocument="false" EmitCss="true" />
|
||||
<ObjectStyle EmitCss="true">
|
||||
<ObjectExportOption SizeType="DefaultSize" CustomSize="$ID/" PreserveAppearanceFromLayout="PreserveAppearanceDefault" />
|
||||
@@ -78,12 +76,7 @@ tools/root_values.py; evidence in docs/format/idml-values.md.
|
||||
</ObjectStyle>
|
||||
</Values>
|
||||
<Values MinimumVersion="13">
|
||||
<ParagraphStyle IncludeClass="true" ParagraphBorderOverprint="false" ParagraphBorderGapTint="-1" ParagraphBorderGapOverprint="false" ParagraphBorderStrokeEndJoin="MiterEndJoin" ParagraphBorderTopLeftCornerOption="None" ParagraphBorderTopRightCornerOption="None" ParagraphBorderBottomLeftCornerOption="None" ParagraphBorderBottomRightCornerOption="None" ParagraphShadingTopLeftCornerOption="None" ParagraphShadingTopRightCornerOption="None" ParagraphShadingBottomLeftCornerOption="None" ParagraphShadingBottomRightCornerOption="None" ParagraphBorderDisplayIfSplits="false">
|
||||
<Properties>
|
||||
<ParagraphBorderGapColor type="object">Swatch/None</ParagraphBorderGapColor>
|
||||
<ParagraphBorderType type="object">StrokeStyle/$ID/Solid</ParagraphBorderType>
|
||||
</Properties>
|
||||
</ParagraphStyle>
|
||||
<ParagraphStyle IncludeClass="true" ParagraphBorderOverprint="false" ParagraphBorderGapTint="-1" ParagraphBorderGapOverprint="false" ParagraphBorderStrokeEndJoin="MiterEndJoin" ParagraphBorderTopLeftCornerOption="None" ParagraphBorderTopRightCornerOption="None" ParagraphBorderBottomLeftCornerOption="None" ParagraphBorderBottomRightCornerOption="None" ParagraphShadingTopLeftCornerOption="None" ParagraphShadingTopRightCornerOption="None" ParagraphShadingBottomLeftCornerOption="None" ParagraphShadingBottomRightCornerOption="None" ParagraphBorderDisplayIfSplits="false" />
|
||||
<CharacterStyle IncludeClass="true" />
|
||||
<ObjectStyle IncludeClass="true">
|
||||
<TransformAttributeOption TransformAttrLeftReference="PageEdgeReference" TransformAttrTopReference="PageEdgeReference" TransformAttrRefAnchorPoint="TopLeftAnchor" />
|
||||
|
||||
+3
-3
@@ -434,13 +434,13 @@ mod tests {
|
||||
fn gates_values_by_version() {
|
||||
let old = root_style("ParagraphStyle", 7);
|
||||
let new = root_style("ParagraphStyle", 21);
|
||||
assert_eq!(old.attr("KeepFirstLines"), Some("2"));
|
||||
assert_eq!(old.attr("KeepLastLines"), Some("2"));
|
||||
assert_eq!(old.attr("PageNumberType"), Some("AutoPageNumber"));
|
||||
assert!(old.attr("EmitCss").is_none());
|
||||
assert_eq!(new.attr("EmitCss"), Some("true"));
|
||||
assert!(old.attr("ParagraphBorderOverprint").is_none());
|
||||
assert_eq!(new.attr("ParagraphBorderOverprint"), Some("false"));
|
||||
let props = new.child("Properties").unwrap();
|
||||
assert!(props.child("RuleBelowGapColor").is_some());
|
||||
assert!(props.child("ParagraphBorderType").is_some());
|
||||
let os = root_style("ObjectStyle", 21);
|
||||
assert!(
|
||||
os.child("TextFramePreference")
|
||||
|
||||
+3
-2
@@ -323,8 +323,9 @@ fn text_layout(id: u32) -> Option<Layout> {
|
||||
// Ruby and kenten font styles are strings too (attributes.md,
|
||||
// ruby, kenten and warichu).
|
||||
0x1B02 | 0x1A414 | 0x1A423 | 0x1A424 | 0x4234 | 0x424B => Layout::String,
|
||||
// Stroke types of rules, underline and strikethrough.
|
||||
0x1B71 | 0x1B72 | 0x1B95 | 0x1B9D => Layout::RefOrCode,
|
||||
// Stroke types of rules, underline, strikethrough and paragraph
|
||||
// borders.
|
||||
0x1B71 | 0x1B72 | 0x1B95 | 0x1B9D | 0x1BFD => Layout::RefOrCode,
|
||||
0x422E => Layout::Text,
|
||||
0x1B29 => Layout::TabList,
|
||||
0x1B75 => Layout::NestedStyles,
|
||||
|
||||
Reference in new issue
Block a user