TextQualityMode

Stimulsoft Reports.NET discussion
Post Reply
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

TextQualityMode

Post by xss »

Hi,

I couldn't find anything in the Documentation and Forum about TextQualityMode. We got some troubles with the Text component if 'Word Wrap' and 'Can Grow' is set to true. If only one character exceeds the component width, then it is displayed in a second line but only the 1st line will get printed. When changing the TextQualitiyMode to 'Wysiwyg' or 'Typographic' then it works fine.

So what is the difference between 'Default', 'Wysiwyg' and 'Typographic'? How does this affect the Text component for example? Does it decrease the rendering performance of the report?

Thanks in advance.

Greets, XSS
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

TextQualityMode

Post by Andrew »

Hello,

Thank you for a very good question. We will prepare the answer for you.

Thank you.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

TextQualityMode

Post by Andrew »

Hello,

The StiText component and components, inherited from it, have the TextQuality property. This property allows selecting/displaying the quality of the text. The property may have one of three values​​:

Standard.
Typographic.
Wysiwyg.
In the Standard and Typographic modes, text displaying is performed using a GDI + system library. The difference between these modes is that in the Typographic mode, a text is output with antialiasing and looks fine, but the rendering is slow. In the Wysiwyg mode a text is displaying using the GDI system library. The text in this mode may not look as beautiful as in the other two modes.

Why do we need GDI, if GDI + exists and it is more beautiful and easy to use? To answer this question, lets turn to the definition of the WYSIWYG.
WYSIWYG (acronym for "What You See Is What You Get") is a way of editing, in which the content in the process of editing looks very similar to the final output. With regard to the reporting tool, this means that the report should look the same when editing a template, and viewing the finished report printed on paper. However, in practice, it is not so simple. Many methods can display a text in different ways on different monitors and in different ways to print it on different printers. This is particularly evident in a large text: when viewing in the preview with different zoom modes and printing, line breaks can be located in different places. This occurs due to many reasons. In the GDI + system library, most of these problems have been solved, but not all, and sometimes inaccurate displaying still occur. To solve the remaining problems one need full control of the text output. GDI + does not provide such control. Therefore, the Wysiwyg mode was added. In this mode a text is output using the GDI. GDI methods allow you to control the output of each character of a text. This can eliminate almost all the problems. Thus, the Wysiwyg mode displays the text not as pretty as the other two methods, but more accurately.

There is another difference between these two modes: as a text in each mode is displayed in different ways, then the measurement of length of a line is done in different ways. For example, we have three text boxes with the "Test string" text; set the TextQuality to Standard for the first text box, to Typographic for the second one, and to Wysiwyg for the third. Set the AutoWidth property to true for all the text boxes. In the design mode of the report we get the following:

Please see the first image

By sight the difference between these lines is not visible. However, after rendering, the width of the text boxed will be calculated depending on the width of the text, and we will immediately see the difference between the modes:

Please see the second image

In the above picture it is clearly seen that for different types and sizes of fonts completely different results are obtained. This must be taken into account, for example, if you are going to use the Cross-Tab component. In this component the table columns widths are fit depending on text, and, in different modes, the width of the table can be changed.

Thank you.
Attachments
887.TextQuality2.gif
887.TextQuality2.gif (16.21 KiB) Viewed 2398 times
886.TextQuality1.gif
886.TextQuality1.gif (2.64 KiB) Viewed 2397 times
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

TextQualityMode

Post by xss »

Hi Andrew,

thank you very much for your detailed explanation.

Greets, XSS
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

TextQualityMode

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply