| View previous topic :: View next topic |
| Author |
Message |
kokkoras Senior Member

Joined: 12 Mar 2005 Posts: 250 Location: Thessaloniki, Greece
|
Posted: 18/08/06 08:02 Post subject: 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: | | 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 |
|
| Back to top |
|
 |
Kambiz Administrator

Joined: 07 Mar 2003 Posts: 1044 Location: Tehran, Iran
|
Posted: 18/08/06 13:03 Post subject: |
|
|
Initial font of each object is the SimpleGraph's font.
Yes, you have to compare every single property of the font object.
_________________ Kambiz |
|
| Back to top |
|
 |
kokkoras Senior Member

Joined: 12 Mar 2005 Posts: 250 Location: Thessaloniki, Greece
|
Posted: 18/08/06 13:05 Post subject: |
|
|
| Kambiz wrote: | | Yes, you have to compare every single property of the font object. |
sad but true! thanks.
_________________ Fotis |
|
| Back to top |
|
 |
kokkoras Senior Member

Joined: 12 Mar 2005 Posts: 250 Location: Thessaloniki, Greece
|
Posted: 19/08/06 11:48 Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Johnny_Bit Moderator
Joined: 15 Jun 2003 Posts: 274
|
Posted: 19/08/06 16:38 Post subject: |
|
|
| every tt font has regular, bold, italic and bold italic, what more d'you want? Simply use Freetype thingie and have some fun!
|
|
| Back to top |
|
 |
kokkoras Senior Member

Joined: 12 Mar 2005 Posts: 250 Location: Thessaloniki, Greece
|
Posted: 19/08/06 20:26 Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|