Tag Archives: text

Draw different styles of “illuminated” text in C#

My previous post Draw “illuminated” text in C# showed how to draw “illuminated” text. It drew each paragraph’s initial letter in a large font with a box around it. Real illuminated manuscripts typically make the initial letter much more elaborate. … Continue reading

Posted in fonts, graphics, strings | Tagged , , , , , , , , , | Leave a comment

Draw “illuminated” text in C#

This example lets you draw “illuminated text” where each paragraph begins with an oversized letter. In some illuminated manuscripts, the first letter of a paragraph is drawn in a larger font than the remaining text. This example does something similar. … Continue reading

Posted in fonts, graphics, strings | Tagged , , , , , , , , , | 2 Comments

Use a custom dash pattern with WPF and XAML in C#

My post Render dashed lines in a WPF program using C# explains how a WPF program can use C# code to render lines with a custom dash pattern onto a bitmap. This post shows how to use a custom dash … Continue reading

Posted in drawing, geometry, graphics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Draw improved text on a curve in C#

This example shows how to draw improved text along a curved path. The example Draw text on a curve in C# shows how to draw text along a curved path. Unfortunately the spacing between the letters is pretty mediocre in … Continue reading

Posted in algorithms, drawings, fonts, graphics, transformations | Tagged , , , , , , , , , , , , , , , | Leave a comment

Draw text on a curve in C#

The example Draw text on a line segment in C# shows how to draw text that follows a line segment. This example uses that code to draw text on a curve. The DrawTextOnPath method shown in the following code uses … Continue reading

Posted in algorithms, fonts, graphics | Tagged , , , , , , , , , , , , , , | 3 Comments

Draw text on a line segment in C#

This example shows how you can draw text on a line segment. The key is the DrawTextOnSegment method shown in the following code. This method can draw text on a line segment or below a line segment. // Draw some … Continue reading

Posted in algorithms, drawing, fonts, graphics, transformations | Tagged , , , , , , , , , , , , , , , | Leave a comment

Render text onto a RenderTargetBitmap with WPF and C#

In earlier examples such as Easily render rotated text in a WPF program using C#, I explained how to render text in a WPF program. Those examples draw text on the program’s window at runtime. Sometimes you may want to … Continue reading

Posted in drawing, graphics, image processing, wpf, XAML | Tagged , , , , , , , , , , , , , , , | 3 Comments

Get font metrics in a WPF program using C#

This example explains how to get font metrics in a WPF application. It’s actually not too hard, it’s just hard to figure out how to do it. The font metrics are tucked away inside the FormattedText object and the Typeface … Continue reading

Posted in drawing, geometry, graphics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Easily render rotated text in a WPF program using C#

The example Render text easily in a WPF program using C# shows how to make an extension method that makes rendering text easy in WPF. This example makes a similar extension method that helps you render rotated text. This is … Continue reading

Posted in drawing, extension methods, geometry, graphics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , | 1 Comment

Render text filled with an image in a WPF program using C#

The example Render outlined text in a WPF program using C# shows how to draw text that is filled with one color and outlined with another. This example uses the following overridden OnRender to render text filled with an image. … Continue reading

Posted in drawing, geometry, graphics, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , , , | Leave a comment