[Lazarus] Lazarus IDE text display

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Aug 17 08:59:29 CEST 2020


On Mon, 17 Aug 2020 00:14:07 +0200
Martin Frb via lazarus <lazarus at lists.lazarus-ide.org> wrote:

> On 16/08/2020 23:19, Alexey via lazarus wrote:
> >   > Ideally "default" for the IDE font would give a sensible
> >   > monospace font for each platform  
> >
> > No, “default” is def variable width font.
> > But yes, we need new alias for default mono font, eg “def_mono”.
> > And I will use it, and IDE should use it.
> >
> > Courier isn’t installed on all OS. Courier New too. For new alias,
> > LCL must detect it... Maybe there isn’t such api in main OSes? 
> 
> I dont know if this is still used (from unit synedit)
> But it does not have cocoa

Cocoa works with Courier New.

I personally use Andale Mono under Cocoa.

Mattias


 
> procedure InitSynDefaultFont;
> begin
>    if SynDefaultFontName <> '' then exit;
>    Screen.Fonts;
>    {$UNDEF SynDefaultFont}
>    {$IFDEF LCLgtk}
>      SynDefaultFontName   := 
> '-adobe-courier-medium-r-normal-*-*-140-*-*-*-*-iso10646-1';
>      SynDefaultFontHeight := 14;
>      {$DEFINE SynDefaultFont}
>    {$ENDIF}
>    {$IFDEF LCLcarbon}
>      SynDefaultFontName   := 'Monaco'; // Note: carbon is case
> sensitive SynDefaultFontHeight := 12;
>      {$DEFINE SynDefaultFont}
>    {$ENDIF}
>    // LCLgtk2 and LCLQt use default settings
>    {$IFnDEF SynDefaultFont}
>      SynDefaultFontName   := 'Courier New';
>      SynDefaultFontHeight := -13;
>    {$ENDIF}
>    if Screen.Fonts.IndexOf(SynDefaultFontName) >= 0 then
>      exit;
>    if Screen.Fonts.IndexOf('DejaVu Sans Mono') >= 0 then begin
>      SynDefaultFontName   := 'DejaVu Sans Mono';
>      SynDefaultFontHeight := 13;
>    end;
> end;
> 



More information about the lazarus mailing list