[Lazarus] Lazarus has unique font sizes

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Aug 15 17:03:55 CEST 2009


Graeme Geldenhuys schrieb:

> Does anybody else excluding Paul know what negative fonts sizes mean? 
> Please answer, I would like to know if I missed something major in my 
> 15+ years of working as a developer.

AFAIR the positive and negative values reflect the inclusion and 
exclusion of the "external leading" of an font, affecting the line 
spacing of multi-line text.

In controls with a single line of text (labels, edits, buttons...), no 
extra line spacing should be added to the font. In controls with 
multiple lines of text, extra line spacing should be inserted in order 
to make the text more readable.

Delphi allows to encode both font properties in an single property 
value, but it would be more obvious to the user, when additional 
properties would reflect the according effects.

I'm not sure how the Delphi font settings are translated into Windows 
font properties. Windows text output has traditional problems with fonts 
and controls, because the text is painted into surrounding boxes 
independently, so that text in a row of boxes can sit on different 
baselines. Other widgetsets may have similar problems, when e.g. borders 
of various sizes affect the remaining room for text. Aligning borderless 
labels and edit boxes is a PITA, that could be cured by practical and 
meaningful layout rules for such bread-and-butter components.

DoDi





More information about the Lazarus mailing list