Overview
graphitepdf-style provides compatibility-oriented style types that can be derived from resolved stylesheet data and converted into graphitepdf_layout::LayoutStyle.
Scope
graphitepdf-style contains:
- the compatibility
Styletype - compatibility layout enums such as
FlexDirection,JustifyContent, andAlignItems - re-exported font and stylesheet types used by style-facing APIs
- conversion between resolved stylesheet values and layout-facing style data
Installation
API Summary
| Category | Items |
|---|---|
| Style facade | Style, EdgeInsets |
| Layout-like enums | FlexDirection, JustifyContent, AlignItems |
| Font re-exports | FontDescriptor, FontSource, FontStyle, FontVariantWeight, StandardFont |
| Stylesheet re-exports | Stylesheet, StylesheetContainer, StylesheetMap, StyleValue |
Example
use ;
Design Principles
- keep compatibility style behavior explicit
- reuse the canonical layout style model rather than diverging from it
- expose font and stylesheet inputs through a simpler facade
- avoid becoming a second independent style engine
Role In GraphitePDF
This crate is an adapter used by document, the root facade, and compatibility-facing code. The canonical layout crate still owns downstream positioning and rendering behavior.
License
MIT