[Lazarus] Real Font Size

zeljko zeljko at holobit.net
Mon Jun 17 13:08:49 CEST 2013


On 06/17/2013 01:04 PM, Vojtěch Čihák wrote:
> Thanks, I tried:
>
> uses ... LCLIntf, LCLType;
>
> var aLogFont: TLogFont;
> begin
>      LCLIntf.GetObject(Label1.Font.Reference.Handle, sizeof(TLogFont), @aLogFont);
>      WriteLn(aLogFont.lfHeight);
>
> but it doesn't work (returns -1 on Qt and 0 on GTK). lfFaceName works well, returns correctly "DejaVu Sans" for both Qt and GTK here.

hm  .... this is from qtwinapi:
  ALogFont^.lfHeight := AFont.getPixelSize;

Qt returns pixelSize, but in case if it's -1 then getPointSize should be 
returned.
Pls open issue about this, I'll fix it.

Gtk2 returns only font name (other info isn't implemented) , so separate 
issue about this would be a "nice to have".

zeljko





More information about the Lazarus mailing list