Please add draw texts feature in XamSvg for Xamarin Forms
Not sure if these links will be perpetual, but I can provide 2 examples:
Font embed in the SVG:
Font ref by name:
Also, here is the xml of an example svg that I created:
<svg width="120" height="25" xmlns="http://www.w3.org/2000/svg"><text x="0" y="20" font-family="Open Sans" font-weight="200">Open Sans Test</text></svg>
There are other ways to reference a font from external sources, but I don't believe that needs to be supported now...
I understand the concern with custom fonts and that each platform has a different way they package and reference them. So we'll need an Init API in XamSVG to provide a map for the non-embed fonts. For example, UWP requires a path to the font file, while iOS references by Unique Identifier. I believe the map would require font name, style, weight, IsBold, IsItalics... and then the identifiers required for each platform. There may be other ways to create the map.
AdminAndrea (Support Manager, Vapolia) commented
Hey, it is possible but requires a font mapping feature, as custom fonts must be hard coded in iOS. You have a sample SVG requiering this feature ?
Attributed text would be super awesome for iOS
Maybe a custom text view for android?