Sign in Join

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

Mailing lists / lazarus / 2020-10

Font "default_mono"

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

AlexeyT

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

Reply by email