Expand description
svgtypes is a collection of parsers for SVG types.
§Supported SVG types
<color><number><length><angle><viewBox><path><transform><list-of-numbers><list-of-lengths><list-of-points><filter-value-list><paint><preserveAspectRatio><enable-background><IRI><FuncIRI>paint-order
§Features
- Complete support of paths, so data like
M10-20A5.5.3-4 110-.1will be parsed correctly. - Implicit path commands will be automatically converted into explicit one.
- Some SVG2 data types support.
- Pretty fast.
§Limitations
- Accepts only normalized values,
e.g. an input text should not contain
 or&data;. - All keywords must be lowercase. Case-insensitive parsing is supported only for colors (requires allocation for named colors).
- The
<color>followed by the<icccolor>is not supported. As the<icccolor>itself. - System colors, like
fill="AppWorkspace", are not supported. They were deprecated anyway.
§Safety
- The library should not panic. Any panic considered as a critical bug and should be reported.
- The library forbids unsafe code.
§Alternatives
None.
Structs§
- Representation of the
<angle>type. - Representation of the
preserveAspectRatioattribute. - Representation of the
<color>type. - A pull-based
<filter-value-list>parser. - The values of a
fontshorthand. - Representation of the
<FuncIRI>type. - Representation of the
<IRI>type. - Representation of the
<length>type. - A pull-based
<list-of-length>parser. - An SVG number.
- A pull-based
<list-of-numbers>parser. - Representation of the
paint-orderproperty. - A pull-based path data parser.
- A pull-based
<list-of-points>parser. - A simplifying Path Data parser.
- Representation of the
<transform>type. - A pull-based
<transform-list>parser. - Representation of the
<transform-origin>type. - Representation of the
<viewBox>type.
Enums§
- Representation of the
alignvalue of thepreserveAspectRatioattribute. - List of all SVG angle units.
- List of all SVG directional positions.
- Representation of the
enable-backgroundattribute. - List of all errors.
- Representation of the
<filter-function>|<url>type. - A list of possible
FilterValueListParsererrors. - A type of font family.
- List of all SVG length units.
- Representation of the
<paint>type. - Representation of the fallback part of the
<paint>type. paint-orderproperty variants.- Representation of a path segment.
- Representation of a simple path segment.
- Transform list token.
- List of possible
TransformOriginparsing errors. - List of possible
ViewBoxparsing errors.
Functions§
- Parses a list of font families and generic families from a string.