Tag Archives: fonts

Flow words around drop caps 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 main places where … Continue reading

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

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 , , , , , , , , , , , , | 2 Comments

Draw text with colors reversed along a sine wave in C#

The post Draw text with colors reversed along a diagonal line in C# demonstrated a general technique for splitting text (or any other image) into pieces that are drawn differently. That example showed how to draw text with some areas … Continue reading

Posted in drawing, fonts, graphics | Tagged , , , , , , , , , | Leave a 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 wrapped to fit columns in C#

The post Draw aligned columns of data in C# shows one way to draw text in rows and columns. It uses the Graphics class’s MeasureString method to size the columns so they are big enough to display their data without … Continue reading

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

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 StringFormat to align text in columns in C#

My previous post Use tabs and StringFormat to align text in C# showed how to use a StringFormat object to draw tab-delimited text in columns. Unfortunately, that method doesn’t give you control over how the values in each column are … Continue reading

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

Use tabs and StringFormat to align text in C#

This example shows how you can use a StringFormat object to align tab-delimited text when drawing it on a window. The Graphics class’s DrawString method draws a string on a window, PictureBox, Bitmap, or other drawing surface. The DrawString method … Continue reading

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