Support Me ☕

OfPlanet

AssetFlow

AssetFlow is a simple and lightweight library for managing custom fonts and images inside .NET applications.

It solves a common problem developers face: missing fonts and images after publishing the application.


📦 Project Setup

Create an Assets folder inside your project:

Assets
│
├── Fonts
│   └── MyFont.ttf
│
└── Images
    └── logo.png

🔤 Adding Custom Fonts

Place your custom font files inside:

Assets/Fonts

Example:

Assets
 └── Fonts
     └── InkFree.ttf

File Properties

Select your font file and set:

  • Build Action = Content
  • Copy to Output Directory = Copy if newer

🖼️ Adding Images

Place your images inside:

Assets/Images

Example:

Assets
 └── Images
     └── logo.png

File Properties

  • Build Action = Content
  • Copy to Output Directory = Copy if newer

🚀 Usage

Add the namespace:

using AssetFlow;

Using a Custom Font

label1.Font =
    Asset.Font(
        "InkFree",
        20
    );

Do not include the file extension.

❌ Wrong:

Asset.Font("InkFree.ttf",20);

✅ Correct:

Asset.Font("InkFree",20);

Using an Image

pictureBox1.Image =
    Asset.Image(
        "logo"
    );

The same rule applies. Do not write the extension.

❌ Wrong:

Asset.Image("logo.png");

✅ Correct:

Asset.Image("logo");

📌 Complete Example

using AssetFlow;

namespace MyApplication
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            label1.Font =
                Asset.Font(
                    "InkFree",
                    20
                );

            pictureBox1.Image =
                Asset.Image(
                    "logo"
                );
        }
    }
}

✨ Features

  • Simple font management
  • Simple image management
  • No hardcoded paths
  • Works with Debug and Release builds
  • Clean and developer-friendly API

AssetFlow makes managing application assets easier.