Text Vectorization & Text Security – .NET

Aspose.SVG proposes you convert text to vector in a short time and with professional quality and resolution! In the vectorized SVG text, all font glyphs are replaced with a combination of graphics elements. Convert your SVG text with our Text to Vector app and get all the advantages of vectorized text!

Text “Banner Text to Vector”

The text elements are closely related to the concept of font, glyph and symbol. When a computer renders characters, it maps those characters to glyphs in a font.

In the vectorized SVG text, all font glyphs are replaced with the combination of <path>, <use>, <mask>, <g> elements, and etc. When you convert text to a vector path, you will no longer be able to edit the text in a text editor. Thus, text vectorization serves as some text security from unwanted using, borrowing, and editing. But, you will be able to edit the vector paths. Keep in mind that the text is no longer saved as a font, it became a vector object. This will allow you to create logos or wordmarks, combine multiple paths into a single, reduce the file size, etc.

Text vectorization can be useful in cases where unique fonts are applied to the text, which are not installed on the user’s configuration. Vectorized SVG text retains its style (font) when getting in any computer environment, whether this font is installed or not. This is why that fonts within most vector logos containing text are converted to outlines.

The vectorized text, being a digital graphic, can be scaled with saving quality. The filter, mask, opacity, and other effects can be applied to the vectorized SVG text. Vectorization also results in the reduction of the generated SVG Document.

Aspose.SVG for .NET API provides the feature of vectorizing text elements in SVG documents. To vectorize text, set the VectorizeText property of the SVGSaveOptions class to true.

The following code snippet demonstrates the use of the VectorizeText property for text vectorization in text.svg file:

 1using System.IO;
 2using Aspose.Svg;
 3using Aspose.Svg.Saving;
 4...
 5
 6    // Load an SVG document from a file
 7    var document = new SVGDocument(Path.Combine(DataDir, "text.svg"));
 8
 9    // Set text elements vectorization 
10    var saveOptions = new SVGSaveOptions
11    {
12        VectorizeText = true
13    };
14
15    // Save the SVG document with specified saveOptions
16    document.Save(Path.Combine(OutputDir, "text_vectorized.svg"), saveOptions);

The vectorized text, being a digital graphic, has some advantages:

You can download the complete C# examples and data files from GitHub. About downloading from GitHub and running examples, you find out from the How to Run the Examples section.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.