## Font Handling in TSimpleGraph

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

### Font Handling in TSimpleGraph

I have two nodes (node1, node2), the font of which is set to a common TFont selected from a FontDialog. So far so good. Why comparing the font of these nodes for using different fonts returns false? That is:
Code: Select all
node1.font<>node2.font

evaluates to true. Any idea?

When a node is created the typical way, does it have it's font set to some value or it is undefined and the hostSimpleGraph.font is used? Could this be the problem?

edit: after some investigation, it seems that the font property points to some address. Comparing the way I described earlier is like comparing two different addresses. Silly me....

Now the question is:
Do I have to compare every single property of TFont to deside if two TFont instances have the same content?
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Initial font of each object is the SimpleGraph's font.

Yes, you have to compare every single property of the font object.
Kambiz

Kambiz
Administrator

Posts: 2428
Joined: March 7th, 2003, 7:10 pm

Kambiz wrote:Yes, you have to compare every single property of the font object.

sad but true! thanks.
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

a bit off-topic question:

Is there any way to fill a combo-box with the available typefaces of a given font, like in the script combo box of the TFontDialog?

Thanks.
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

every tt font has regular, bold, italic and bold italic, what more d'you want? Simply use Freetype thingie and have some fun!
Johnny_Bit
VIP Member

Posts: 455
Joined: June 15th, 2003, 9:56 am

Johnny_Bit wrote:every tt font has regular, bold, italic and bold italic, what more d'you want? Simply use Freetype thingie and have some fun!

Sorry, my intention was to ask about charsets, not typefaces. I am asking about DEFAULT_CHARSET, GREEK_CHARSET, ANSI_CHARSET, etc. Is there any way to get those for the selected TT Font?
Fotis

kokkoras
Moderator

Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Return to DELPHI AREA Projects

### Who is online

Users browsing this forum: No registered users and 2 guests