You need to use 58531<br><br>On Sunday, July 15, 2018, Michael Ring via Lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>I today build Lazarus MacOSX/Cocoa<b> </b>from svn and realized
      that all characters in the editor seem to have an extra space
      between each character.</p>
    <p>I did a little compiling of older SVN's and found out that the
      problem appeared first in revision 58529.</p>
    <p><br>
    </p>
    <p>This change in 58529 seems to kill the cat:</p>
    <p><br>
    </p>
    <p><font face="Courier New, Courier, monospace">Index:
        lcl/interfaces/cocoa/<wbr>cocoagdiobjects.pas<br>
==============================<wbr>==============================<wbr>=======<br>
        --- lcl/interfaces/cocoa/<wbr>cocoagdiobjects.pas    (revision 58528)<br>
        +++ lcl/interfaces/cocoa/<wbr>cocoagdiobjects.pas    (working copy)<br>
        @@ -559,6 +559,7 @@<br>
           Win32Weight, LoopCount: Integer;<br>
           CocoaWeight: NSInteger;<br>
           FTmpFont: NSFont;<br>
        +  IsDefault: Boolean;<br>
         begin<br>
           inherited Create(AGlobal);<br>
        <br>
        @@ -570,7 +571,18 @@<br>
             // because otherwise the result is wrong in Mac OS X 10.11,
        see bug 30300<br>
             // Code used for 10.10 or inferior:<br>
             // FName :=
        NSStringToString(NSFont.<wbr>systemFontOfSize(0).<wbr>familyName);<br>
        -    if IsFontNameDefault(FName) then<br>
        +    //<br>
        +    // There's a differnet issue with not using systemFont.<br>
        +    // NSComboBox, if assigned a manually created font have an
        odd ascending-offset<br>
        +    // (easily seen in Xcode interface builder as well).
        systemFonts()<br>
        +    // don't have such issue at all. see bug 33626<br>
        +    // the fix below (detecting "default" font and use
        systemFont()) is a potential<br>
        +    // regression for bug 30300.<br>
        +    //<br>
        +    // There might font properties (i.e. Transform Matrix) to
        adjust the position of<br>
        +    // the font. But at this time, it's safer to use
        systemFont() method<br>
        +    IsDefault := IsFontNameDefault(FName);<br>
        +    if not IsDefault then<br>
             begin<br>
               FTmpFont :=
NSFont.fontWithName_size(<wbr>NSFont.systemFontOfSize(0).<wbr>fontDescriptor.postscriptName,
        0);<br>
               FName := NSStringToString(FTmpFont.<wbr>familyName);<br>
        @@ -594,14 +606,14 @@<br>
               include(FStyle, cfs_StrikeOut);<br>
        <br>
             // If this is not a "systemFont" Create the font ourselves<br>
        -    FontName := NSStringUTF8(FName);<br>
        -    Attributes := NSDictionary.<wbr>dictionaryWithObjectsAndKeys(<br>
        -          FontName, NSFontFamilyAttribute,<br>
        -          NSNumber.numberWithFloat(<wbr>FSize), NSFontSizeAttribute,<br>
        -          nil);<br>
        -    FontName.release;<br>
        -    Descriptor :=
        NSFontDescriptor.<wbr>fontDescriptorWithFontAttribut<wbr>es(Attributes);<br>
        -    FFont :=
        NSFont.fontWithDescriptor_<wbr>textTransform(Descriptor, nil);<br>
        +    if IsDefault then<br>
        +    begin<br>
        +      FFont := NSFont.systemFontOfSize( FSize );<br>
        +    end else begin<br>
        +      FontName := NSStringUTF8(FName);<br>
        +      FFont := NSFont.fontWithName_size(<wbr>FontName, FSize);<br>
        +      FontName.release;<br>
        +    end;<br>
        <br>
             if FFont = nil then<br>
             begin<br>
        @@ -620,7 +632,6 @@</font><br>
               exit;<br>
             end;<br>
           end;<br>
      -<br>
           // we could use NSFontTraitsAttribute to request the desired
      font style (Bold/Italic)<br>
           // but in this case we may get NIL as result. This way is
      safer.<br>
           if cfs_Italic in Style then<br>
    </p>
  </div>

</blockquote>