Proposal. Font "default_mono" lazarus / 31-LCL ---------------------------------------------------------------------- AlexTP · 2020-10-16 08:04 I suggest to introduce LCL font "default_mono"(we have "default" font only): - on first access to getter/resolver, find some monospaced font: a) if font list has "Consolas"/"Courier New"/"Courier", 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. Maybe use GetDC(0). - 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 ---------------------------------------------------------------------- olly · 2020-10-17 21:52 I've found step b ridiculously slow (15 seconds) using GTK2. There's a post about it somewhere on the forum too. I switched to using the following. Works well on Windows and GTK-2. I don't think it's implemented yet on cocoa though. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function EnumFontsFixedPitchNoDups(var LogFont: TEnumLogFontEx; var Metric: TNewTextMetricEx; FontType: LongInt; Data: LParam): LongInt; stdcall;var  S: String;begin  S := LogFont.elfLogFont.lfFaceName;  if ((LogFont.elfLogFont.lfPitchAndFamily and FIXED_PITCH) = FIXED_PITCH) then    TStringList(PtrUInt(Data)).Add(S);   Result := 1;end; procedure PopulateFonts;var  DC: HDC;  LogFont: TLogFont;begin  LogFont.lfCharSet := DEFAULT_CHARSET;  LogFont.lfFaceName := '';  LogFont.lfPitchAndFamily := {$IFDEF LINUX}FIXED_PITCH{$ELSE}0{$ENDIF};   DC := GetDC(0);   try    EnumFontFamiliesEX(DC, @LogFont, @EnumFontsFixedPitchNoDups, PtrUInt(FFonts), 0);  finally    ReleaseDC(0, DC);  end;end;