GDI Capture PlugIn RawText FontStyle property is not working

Ask general questions here.
manohar.karuvadi
Posts: 16
Joined: Wed Mar 09, 2011 7:38 pm

GDI Capture PlugIn RawText FontStyle property is not working

Post by manohar.karuvadi » Mon Jan 16, 2012 11:36 am

Hi,
In GDI Capture PlugIn RawText property .FontStyle property is not working always that property value returns Normal only.

Here are the code Sample.

public static bool VerifyRawText(this Ranorex.Adapter Container, string ActualText)
{
bool isFound = false;
IList<Ranorex.RawText> Texts = Container.FindChildren<Ranorex.RawText>();
foreach (Ranorex.RawText rText in Texts)
{
if (rText.RawTextValue.Contains(ActualText))
{
System.Windows.Forms.MessageBox.Show(rText.FontStyle );
isFound = true;
break;
}
}
return isFound;
}

Even for bold text also that property value return Normal.
Can any one help on this issue.
Thanks,
Manohar

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: GDI Capture PlugIn RawText FontStyle property is not working

Post by Support Team » Mon Jan 16, 2012 6:18 pm

Hello Manohar,

You are correct, one would expect bold to be part of the font style.
With TrueType fonts however, bold is not a style but actually one of many different font "weights"
The RawText plugin currently doesn't support this. But I will add a feature request for that; we will probably include that in one of our next service releases, either by adding a "FontWeight" attribute or by adding an optional "Bold" string to the style

Regards,
Michael
Ranorex Team