Welcome Guest Search | Active Topics | Members

BUG: Problems When Drawing Using the ITC Stone Sans Semibold Font Options
Fedor
Posted: Wednesday, December 20, 2006 10:24:00 AM

Rank: Advanced Member
Groups: Administration , Member

Joined: 7/28/2003
Posts: 1,254
Points: -345
Location: WA, US
When drawing text strings with the help of Graphics Mill and using the ITC Stone Sans Semibold font, an exception may occur, or the text may be drawn using a different font.

Description

If you draw text using Graphics Mill for .NET, and try to use ITC Stone Sans Semibold font, it may produce an exception, or the text may be drawn using some other different font. In the same time it may work properly on other computers.

The typical symptom of a problem when you draw text through GDI (Aurigma.GraphicsMill.Drawing.GdiGraphics class) is the Aurigma.GraphicsMill.Win32Exception exception which occurs whenever you try to draw a text with this font. Text of the exception will look similar to the follows:

Code:
************** Exception Text **************
Aurigma.GraphicsMill.Win32Exception: GetCharacterPlacement call failed
    at Aurigma.GraphicsMill.Drawing.GdiGraphics._DrawString(String s, Font font, SolidBrush brush, Single x, Single y, Single[] kernings)
    at Aurigma.GraphicsMill.Drawing.GdiGraphics.DrawString(String s, Font font, SolidBrush brush, Int32 x, Int32 y)
    at WindowsApplication1.Form1.button3_Click(Object sender, EventArgs e)...


If you try to draw some text using GDI+ (i.e. using standard .NET class, namely System.Drawing.Graphics), no exception will occur. However, the text may not be rendered correctly, as the acually used font may differ from ITC Stone Sans Semibold.
Reason

The reason of this behavior is a bug of GDI and GDI+.

Solution

Currently, the only solution is to render the text using another font. In particular, it is recommended to handle
the Aurigma.GraphicsMill.Win32Exception exception, and if it is raised, use some fallback font.

Best regards,
Fedor Skvortsov
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.