Declaration
procedure IEParseSVGFontAttributes(const Tag: string; var FontName: string; var FontSizePx: Double; var FontColor: TColor; var FontStyle: TFontStyles; var Opacity: Double; StyleDefinitions: TStringList = nil; InitializeValues: Boolean = True);
Description
Parse a text tag or style content and return the found font attributes.
To parse a CSS style it must be wrapped in {...}, e.g. "{fill:#ffffff;fill-opacity:1;font-size:35;}" .
If InitializeValues = True, values that are not found will be reset to the SVG defaults.
| Demos\InputOutput\SVGParsing\SVGParsing.dpr |
IEParseSVGFontAttributes( '<text x="205" y="430" fill="Orange" font-size="35">ImageEn!</text>', fontName, fontSizePx, fontColor, fontStyle, opacity );
IEParseSVGFontAttributes( '{fill:#ffffff;fill-opacity:1;font-size:35;}', fontName, fontSizePx, fontColor, fontStyle, opacity );
See Also
◼ParseSVG◼IEGetSVGTagType◼IEParseSVGStyleAttributes