Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

What is TFPCustomDrawFont used for

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

As the title says... Also what should I descend my fpGUI font class from? TFPCustomDrawFont or TFPCustomFont?

Regards,
- Graeme -

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Hi, As the title says... Also what should I descend my fpGUI font class from? TFPCustomDrawFont or TFPCustomFont?

It depends.

A TFPCustomDrawFont descendent "knows" how to draw itself on a canvas: Normally you should not use it, unless you are planning to use freetype support. There the font draws itself on a canvas. In all other cases (windows, X etc), the canvas "knows" how to handle a font. (namely, the system does it)

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote 6 lines
A TFPCustomDrawFont descendent "knows" how to draw itself on a canvas: Normally you should not use it, unless you are planning to use freetype support. There the font draws itself on a canvas. In all other cases (windows, X etc), the canvas "knows" how to handle a font. (namely, the system does it)

Ummm... I don't use freetype directly, but rather Xft (under X11). My calls are normally Canvas.TextOut(...), so I think TFPCustomFont will be my best bet for now.

Thanks again.

Graeme.

Reply by email