Skip to main content

Crate acorde_layout

Crate acorde_layout 

Source
Expand description

Logical, pixel-free score layout engine for acorde-core scores — computes row breaks, multi-rest collapsing, beam groups, tuplet groups, courtesy accidentals, and span (hairpin/ottava/pedal/slur) resolution for score renderers (e.g. VexFlow).

Structs§

AccidentalMark
A mandatory (non-courtesy) accidental that must be drawn beside a notehead.
BeamGroup
A group of beamed notes within a single voice of a measure.
ConcertKeyOverride
Concert-pitch key signature override for a specific staff of a transposing instrument.
CourtesyAccidental
A courtesy (cautionary) accidental to display in parentheses.
GlyphExtents
The content bounds of a validated glyph placement collection, in millimetres.
GlyphMetrics
Font-independent metrics for one print glyph, expressed in millimetres.
GlyphPlacement
A positioned print glyph with a deterministic collision priority.
GlyphResourceDescriptor
Reproducible metadata for a host-resolved font or notation glyph resource.
KeepTogetherRange
A contiguous range of physical measures that must remain in one printed system.
LayoutConfig
Configuration for a layout pass.
LayoutResult
The result of a layout pass.
MeasureMark
Host-neutral notation marks attached to one physical measure in a print system.
MeasureSpan
Physical measure interval represented by one visual measure slot.
NoteAddr
Physical address of a note within a score.
PageAddress
Stable address of a page within one print-layout result.
PageArtifact
A host-neutral page export descriptor.
PageLayout
One page in a PrintLayoutResult.
PagePublication
Publication information for one logical page.
PageRenderNode
One node with its physical page and system ownership.
PageRenderTree
Deterministic semantic tree for one physical page.
PageSpanSegment
A cross-system span’s intersection with one printed page.
PartGroupMark
A score-level part connector for a publication host.
PartLabel
A part label suitable for a score header or extracted-part host renderer.
PrintConfig
Host-neutral inputs for deterministic page and system layout.
PrintLayoutResult
Deterministic page/system geometry for a score.
PublicationConfig
Host-neutral publication metadata policy carried into each page artifact.
PublicationFrame
A host-rendered rectangular publication frame in physical page coordinates.
PublicationImageResource
A host-resolved image reference in physical print coordinates.
PublicationPageTemplate
Alternate running text for odd and even numbered music pages.
PublicationSection
A named publication section beginning at one physical measure.
PublicationSpacer
Extra vertical space inserted before the system that begins at one physical measure.
PublicationTextBlock
A page text block with deterministic physical placement.
RowLayout
One horizontal row (system) of measures.
SourceVoiceAddress
Mapping from a stable canonical voice slot to its original MusicXML voice number.
SpanSegment
A span’s intersection with one printed system.
SystemAddress
Stable address of a system, including global and page-local positions.
SystemLayout
A logical system placed on a page.
TupletGroup
A group of notes forming one tuplet bracket within a single voice of one measure.

Enums§

BreakReason
Explains why a system or page ended at its final measure.
CropMarkPolicy
Whether a host should expose crop marks at the configured bleed boundary.
FinalPagePolicy
Policy for distributing systems when automatic pagination would leave a one-system final page.
GlyphCollisionClass
Semantic collision classes used to make dense print placement deterministic.
GlyphCollisionDirection
The permitted escape direction for a lower-priority placement in a unified collision pass.
GlyphFallbackPolicy
How a print host should behave when the primary glyph resource is unavailable.
GlyphPlacementError
Validation failures for host-provided print glyph geometry.
GlyphResourceDescriptorError
Validation failures for a host-provided glyph resource descriptor.
GlyphResourcePolicy
How a host resolves fonts and notation glyph resources for print output.
NotationBreakPolicy
Policy for preserving repeat-ending notation while systems are reflowed.
PageArtifactDiagnostic
Typed, host-neutral diagnostics attached to a page export descriptor.
PageNumbering
Policy for the page number exposed in logical page metadata.
PageOrientation
Page orientation for a logical print layout.
PageRenderAddress
Canonical score address or page-owned publication address for one render node.
PageRenderNodeKind
Backend-neutral semantic node in a page render tree.
PaperSize
A paper size expressed in physical millimetres.
PartLayoutPolicy
Selects the score scope used by print pagination and notation metadata.
PickupPolicy
Policy for reserving the first system for a partial pickup measure.
PrintColorPolicy
Color intent for a print-capable host.
PrintLayoutError
PrintPreset
Reproducible starting configurations for common publication workflows.
PublicationFramePlacement
The page scope in which a host should draw a publication frame.
PublicationImagePlacement
The page scope in which a host should place a publication image resource.
PublicationTextAlignment
Horizontal alignment within a publication text block’s physical width.
PublicationTextRole
Semantic role for a host-rendered publication text block.
SpanMark
A resolved span between two note addresses.

Constants§

GLYPH_RESOURCE_CONTRACT_VERSION
Version of the host-neutral glyph resource descriptor contract.
PAGE_RENDER_TREE_CONTRACT_VERSION
Version of the serializable page-render tree contract.
PRINT_LAYOUT_CONTRACT_VERSION
Version of the serialized host-neutral print layout contract.
PRINT_PRESET_SCHEMA_VERSION
Version of the built-in host-neutral print preset data.

Functions§

compute_layout
Compute a LayoutResult for the given score and configuration.
compute_print_layout
Compute physical page and system placement without rendering or host integration.
compute_print_layout_for_view
Compute print layout for one linked score view without mutating the canonical score.
distribute_glyph_spacing
Distribute additional horizontal space evenly between glyph placements.
glyph_extents
Compute content-aware bounds for glyph placements without loading a font resource.
resolve_glyph_collisions
Move lower-priority glyphs vertically until their bounding boxes no longer overlap.
resolve_glyph_collisions_checked
Validate glyph geometry, then apply deterministic vertical collision resolution.
resolve_glyph_collisions_constrained
Resolve a mixed collection of glyph placements in one deterministic constraint pass.
resolve_glyph_collisions_with_classes
Resolve vertical collisions using explicit semantic classes.
resolve_glyph_horizontal_collisions
Move lower-priority glyphs horizontally until their bounding boxes no longer overlap.
resolve_glyph_horizontal_collisions_checked
Validate glyph geometry, then apply deterministic horizontal collision resolution.
resolve_glyph_horizontal_collisions_with_classes
Resolve horizontal collisions using explicit semantic classes.
validate_glyph_placements
Validate font-independent glyph geometry before collision resolution.