[Lazarus] Font "default_mono"

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Lazarus] Font "default_mono"

Free Pascal - Lazarus mailing list
I suggest to introduce LCL font "default_mono"(we have "default" font only):

- on first access to getter/resolver, and find some monospaced font:

a) if font list has "Courier" or "Courier new" or "Consolas", we take it
(to support Win32 usual font)

b) if no usual names found (case for *BSD+Solaris+Wine) we enumerate
font list, find some, by testing
Canvas.TextWidth('W')=Canvas.TextWidth('i'). The problem here is - we
don't have some Canvas in getter

- on next access to getter, we return calculated name.

- I can find the avg time of this action (step b) on Linux/BSD/Solaris,
if it's needed

Alexey Torgashin

lazarus mailing list
[hidden email]