Tag Archives: text

Flow words around obstacles for document layout in C#

The example Flow blocks around obstacles for document layout in C# implements a document layout algorithm that flows blocks around obstacles. Moving from there to flowing words around obstacles is relatively simple. The following sections describe the two main places … Continue reading

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

Flow blocks around obstacles for document layout in C#

The following two document layout examples draw “illuminated” text by using an initial or drop cap. Draw different styles of “illuminated” text in C# Draw “illuminated” text in C# Martin asked how we could do something similar when the text … Continue reading

Posted in algorithms, fonts, graphics, strings | Tagged , , , , , , , , , , , , | 1 Comment

Draw text with colors reversed along a diagonal line in C#

The post Draw text with colors reversed in its upper and lower halves in C# showed how you can draw text that has upper and lower halves with colors switched. This example uses a similar technique to switch the colors … Continue reading

Posted in drawing, fonts, graphics | Tagged , , , , , , , , , | 1 Comment

Draw text with colors reversed in its upper and lower halves in C#

This example and the two that follow show how to draw text with an interesting visual effect. The idea is quite simple. Make two bitmaps showing the text with its different color schemes. Then use those images to fill different … Continue reading

Posted in drawing, fonts, graphics | Tagged , , , , , , , , , | 1 Comment

Center text above or below a line segment in C#

My post Draw text on a line segment in C# shows how to draw text above or below a line segment, but that technique does not work very well if you want to center text over the segment. That post … Continue reading

Posted in drawing, graphics | Tagged , , , , , , , | Leave a comment

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 , , , , , , , , , | 1 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 , , , , , , , , , | 7 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