drawstring

System.Drawing - bad text rendering using DrawString on top of transparent pixels.

When rendering text into a bitmap, I find that text looks very bad when rendered on top of an area with non-opaque alpha. The problem is progressively worse as the underlying pixels become more transparent. If I had to guess I'd say that when underlying pixels are transparent, the text renderer draws any anti-aliased 'gray' pixels as sol...

Graphics.Drawstring looks nice in PictureBox but horrible in a Bitmap

I am trying to use DrawString to write text as an image and then rotate it 90 degrees. It works fine with both a bitmap or directly on a PictureBox, but the big difference is in the quality. The PictureBox text drawn has great quality and looks nice. When I draw it on an image it looks horrible and blocky. I've made a few changes to ...

C# Graphics.DrawString not rendering special characters?

I'm trying to write some arbitrary text to a custom control.My code works, but when I try to draw characters such as ü, it displays an empty square where the character would be.I need this to work as I intend to support localizations.I have checked already, and Tahoma has the required characters. My code is below: string _Label = "Zurüc...

Compact Framework: drawing multi-line string with ellipses

I'm creating an owner-drawn control inherited from ListView for a Windows Mobile application. I'm using Graphics.DrawString to write out a two-line text string (using .NET CF 3.5). Problem is some items have particularly long text that doesn't fit on the two lines. Googling has found methods for using MeasureString and to manually trunca...

.Net DrawString font reference changes after calling, is this a potential problem

Given the following code. Is there any potential for the first DrawString method to draw in Arial rather than Times New Roman? protected override void OnPaint(PaintEventArgs pe) { Font f = new Font("Times New Roman", this.TextSize); pe.Graphics.DrawString("Test 1", f, Brushes.Black, loc); f = new Font("Arial", this.TextSiz...

.net DrawString Hebrew font with zero-width characters

Are there any additional properties or parms in the DrawString to solve this problem. I have a Hebrew font with many zero-width characters so that two characters should render in the same location. This example shows the .NET problem on the left, and what is should look like on the right: http://hebrewresources.com/html5/images/ren...