VeeFriends.UI
5.0.8
dotnet add package VeeFriends.UI --version 5.0.8
NuGet\Install-Package VeeFriends.UI -Version 5.0.8
<PackageReference Include="VeeFriends.UI" Version="5.0.8" />
<PackageVersion Include="VeeFriends.UI" Version="5.0.8" />
<PackageReference Include="VeeFriends.UI" />
paket add VeeFriends.UI --version 5.0.8
#r "nuget: VeeFriends.UI, 5.0.8"
#:package VeeFriends.UI@5.0.8
#addin nuget:?package=VeeFriends.UI&version=5.0.8
#tool nuget:?package=VeeFriends.UI&version=5.0.8
VeeFriends.UI
A powerful .NET library for generating dynamic, comic-book style text images with professional effects. Perfect for creating eye-catching headings, logos, and promotional graphics with stroke outlines, drop shadows, and custom transformations.
โจ Features
- ๐ฏ Comic-Book Style Text - Professional stroke outlines and drop shadows
- ๐ Rich Color Support - Full RGB/RGBA with smart color encoding
- ๐ CSS-Like Transforms - Rotation and skew transformations
- ๐ฑ URL Serialization - Compact, URL-friendly parameter encoding
- โก High Performance - Optimized memory management and auto-cropping
- ๐จ Custom Typography - Multiple font weights and styles
- ๐ง Dependency Injection Ready - First-class DI support
- ๐งช Thoroughly Tested - Comprehensive test suite
๐ Quick Start
Installation
dotnet add package VeeFriends.UI
Basic Usage
using Microsoft.Extensions.DependencyInjection;
using VeeFriends.UI;
using VeeFriends.UI.Options;
// Setup DI
var services = new ServiceCollection();
services.AddVeeFriendsUI();
var provider = services.BuildServiceProvider();
// Create headings
var headings = provider.GetRequiredService<Headings>();
// Simple text with defaults
using var image = headings.Create("COLLECTIBLES");
await image.SaveAsPngAsync("output.png");
๐จ Examples
Default Comic-Book Style
using var image = headings.Create("AWESOME TEXT");
Creates white text with black stroke outline and drop shadow, with subtle skew and rotation for dynamic comic-book appearance.
Custom Styling
var options = new HeadingOptions
{
Text = "CUSTOM STYLE",
FontSize = 96,
TextColor = Color.Yellow,
StrokeColor = Color.Red,
StrokeWidth = 4f,
ShadowDepth = 12f,
ShadowSmoothness = 1.2f
};
using var image = headings.Create(options);
Transformed Text
var options = new HeadingOptions
{
Text = "ROTATED & SKEWED",
FontSize = 80,
Rotation = -15f, // Rotate 15 degrees counter-clockwise
SkewX = -20f, // Skew left for dynamic effect
TextColor = Color.Blue,
StrokeColor = Color.White
};
using var image = headings.Create(options);
Minimal Clean Text
var options = new HeadingOptions
{
Text = "CLEAN TEXT",
HasShadow = false,
HasStroke = false,
TextColor = Color.Black,
FontSize = 64,
Rotation = 0,
SkewX = 0
};
using var image = headings.Create(options);
๐ ๏ธ Advanced Features
URL Serialization
Perfect for web applications - serialize styling options to compact URLs:
var options = new HeadingOptions
{
Text = "Hello World",
FontSize = 96,
TextColor = Color.Red,
Rotation = -5f
};
// Serialize to URL path
string urlPath = options.ToUrlPath();
// Result: "/txt:Hello+World,fs:96,tc:R,rot:-5/"
// Deserialize back
var restored = urlPath.FromUrlPath();
Color Encoding:
- Common colors use short codes:
R
(Red),B
(Blue),Y
(Yellow) - Custom colors use hex:
7B2D43
(RGB) orFF000080
(RGBA) - Transparent colors supported with alpha channel
Dependency Injection
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddVeeFriendsUI();
// FontLoader, LogoLoader, and Headings are now available
}
}
๐ Configuration Options
Property | Type | Default | Description |
---|---|---|---|
Text |
string? |
null |
The text to render |
FontSize |
float |
128 |
Font size in pixels |
TextColor |
Color |
White |
Main text color |
HasStroke |
bool |
true |
Enable stroke outline |
StrokeColor |
Color |
Black |
Stroke outline color |
StrokeWidth |
float |
2.5f |
Stroke thickness in pixels |
HasShadow |
bool |
true |
Enable drop shadow |
ShadowColor |
Color |
Black |
Shadow color |
ShadowDepth |
float |
8f |
Shadow offset distance |
ShadowExpansion |
float |
1f |
Shadow size expansion |
ShadowSmoothness |
float |
0.8f |
Shadow edge smoothness |
SkewX |
float |
-10f |
Horizontal skew in degrees |
Rotation |
float |
-2f |
Rotation in degrees |
IsUpper |
bool |
true |
Convert text to uppercase |
๐ฏ Use Cases
- Marketing Graphics - Eye-catching promotional text
- Social Media - Branded content and memes
- Gaming UI - Dynamic game titles and notifications
- Web Applications - Generated heading images
- Print Media - High-quality text graphics
- Merchandise - T-shirt and product designs
๐ง Requirements
- .NET 9+
- SixLabors.ImageSharp 3.x
๐๏ธ Architecture
Built on enterprise-grade foundations:
- Memory Safe - Proper resource disposal and exception handling
- Performance Optimized - Zero-allocation string operations where possible
- Thread Safe - Concurrent operations supported
- Extensible - Clean separation of concerns
๐ค Contributing
We welcome contributions! Please see our contributing guidelines for details.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Built with โค๏ธ for the VeeFriends community
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Microsoft.Extensions.Http (>= 9.0.9)
- SixLabors.ImageSharp.Drawing (>= 2.1.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.