Incorrect font scaling

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
sicorspa
Newbie
Newbie
Posts: 43
Joined: Tue Jan 13, 2009 12:00 am

Incorrect font scaling

Post by sicorspa » Tue Apr 03, 2012 1:38 pm

Hi all,
I'm having an error in Teechart 2011 on Delphi Xe.
I have 2 pc with windows 7, one with font at 100% (windows -> control panel -> Appearance and Personalization -> Display setting -> Font Size) and one with 125%.

To avoid the problem of wrong font scaling, i have disabled scaling in my form (Scaled := False). All components respect this options, and many charts in my form also respect this, but not all.

I have 2 charts with Point Series, with series created dinamically (the other charts that work have static series), and with this all my Marks are proportioned wrong in 125%.

Have tryed also to set Serie1.marks.font.pitch := fpFixed, or set Serie1.marks.font.pixelperinch := 96, but nothing change, always wrong.

Is there an option that i miss that can solve this problem?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Incorrect font scaling

Post by Yeray » Wed Apr 04, 2012 8:52 am

Hi sicorspa,

I've tried it with Win 7 x64 and the chart texts seem to behave as the regular TLabel. Find an example attached.
test.zip
(757.83 KiB) Downloaded 720 times
If you still have problems with it, don't hesitate to let us know.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sicorspa
Newbie
Newbie
Posts: 43
Joined: Tue Jan 13, 2009 12:00 am

Re: Incorrect font scaling

Post by sicorspa » Thu Apr 05, 2012 4:00 pm

take your project and set form.scaled to FALSE

i don't want that the marks text is scaled

if you try with scaled to false and try your application with 100% font size (windows 7 option, in windows xp 96dpi) and 125% font size (windows 7 option, in windows xp 120dpi) you will see that the marks text will be scaled up, from 8 pixel height to 10 pixel height.

The form itself isn't scaling, like you can see from the label "My custom label text"

tryed also setting marks.font.pitch := fpFixed, or set marks.font.pixelperinch := 96 but marks are always scaling.

With circle series for example this doens't happen

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Incorrect font scaling

Post by Yeray » Tue Apr 10, 2012 9:38 am

Hi sicorspa,

Adding this to the project above:

Code: Select all

Form1.Scaled:=false;
still gives me a bigger label text in 125% than in 100% mode:
125.png
125% text size
125.png (26.37 KiB) Viewed 13776 times
100.png
100% text size
100.png (20.8 KiB) Viewed 13780 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sicorspa
Newbie
Newbie
Posts: 43
Joined: Tue Jan 13, 2009 12:00 am

Re: Incorrect font scaling

Post by sicorspa » Tue Apr 17, 2012 12:44 pm

You don't undestand.

As I have say in all my posts, I DON'T WANT FONT SCALING, SO I HAVE SET IT TO DISABLE IN THE FORM.

THE PROBLEM IS THAT TEECHART SCALE THE MARKS IGNORING THAT SETTINGS


Try setting Form.Scaled := FALSE;

The Point Series Scale the marks anyway

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Incorrect font scaling

Post by Yeray » Wed Apr 18, 2012 8:09 am

Hi,

I haven't probably explained myself clearly enough.
In my first reply I forgot setting "Form1.Scaled:=false;".
However, I added it in the next reply and, as you can see in the first picture, all the texts seem to be bigger, both the TeeChart texts (axes labels, marks, legend items and title) and non TeeChart related texts (the label "M y custom label text", an the form caption "Form1").
So I'm not sure to be able to reproduce the point:
sicorspa wrote:To avoid the problem of wrong font scaling, i have disabled scaling in my form (Scaled := False). All components respect this options, and many charts in my form also respect this, but not all.
With Form1.Scaled:=false, no component seem to be respecting this option for us here in two different machines.
FontScaling.zip
(757.64 KiB) Downloaded 659 times
If the attached exe gives you a different result than the shown in the images in the zip, there must be something different in our machines and yours.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sicorspa
Newbie
Newbie
Posts: 43
Joined: Tue Jan 13, 2009 12:00 am

Re: Incorrect font scaling

Post by sicorspa » Wed Apr 18, 2012 10:18 am

in your attachments there is form.scaled to true

setting it to false give me this

Image

as you see with 120dpi the label "My custom label text" is alway the same dimension as 96dpi, the marks and the legend of the chart instead grow.

I use Delphi XE and teechart pro 2011

If your label "My custom label text" grow in dimension with 120dpi (or 125% in windows 7 style) is because you haven't set form.scaled to false

it's a standard function in delphi and have alvway worked in all versions, so it's not normal that in your system this option don't work

Image

set it in design time, not runtime

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Incorrect font scaling

Post by Yeray » Thu Apr 19, 2012 1:38 pm

Hi,
sicorspa wrote:set it in design time, not runtime
This seemed to make the difference for me here.
I've added to the wish list the possibility to add a Scaled property or a ScaleBy function in a future release (TV52016158).
Thanks for reporting and explaining it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

sicorspa
Newbie
Newbie
Posts: 43
Joined: Tue Jan 13, 2009 12:00 am

Re: Incorrect font scaling

Post by sicorspa » Fri Apr 20, 2012 7:11 am

Thanks for your support

anyway i think it's also a bug that teechart marks don't respect font scaling disabled in point series (it's not so for vertical bar series and pie series for example)

Post Reply