Przeglądaj źródła

Liberation Sans as default font

johann 5 lat temu
rodzic
commit
c38b7c59b2

+ 3 - 2
lazpaint/tools/utool.pas

@@ -603,7 +603,7 @@ function ToolPopupMessageToStr(AMessage :TToolPopupMessage; AKey: Word = 0): str
 implementation
 
 uses UGraph, LCScaleDPI, LazPaintType, UCursors, BGRATextFX, ULoading, UResourceStrings,
-  BGRATransform, LCVectorOriginal, BGRASVGOriginal, math, ULoadImage;
+  BGRATransform, LCVectorOriginal, BGRASVGOriginal, math, ULoadImage, LCVectorTextShapes;
 
 function StrToPaintToolType(const s: ansistring): TPaintToolType;
 var pt: TPaintToolType;
@@ -2884,7 +2884,7 @@ begin
   FTextOutlineWidth := 2;
   FTextShadow := false;
   FTextFontSize := 10;
-  FTextFontName := 'Arial';
+  FTextFontName := TTextShape.DefaultFontName;
   FTextFontStyle:= [];
   FTextAlign := taLeftJustify;
   FTextPhong := False;
@@ -3478,6 +3478,7 @@ end;
 procedure TToolManager.SetTextFont(AName: string; ASize: single;
   AStyle: TFontStyles);
 begin
+  if AName = '' then AName := FTextFontName;
   if (FTextFontName <> AName) or
     (FTextFontSize <> ASize) or
     (FTextFontStyle <> AStyle) then

+ 1 - 1
lazpaint/uconfig.pas

@@ -946,7 +946,7 @@ end;
 function TLazPaintConfig.DefaultToolTextFont: TFont;
 var fontStyle: TFontStyles;
 begin
-  tempFont.Name := iniOptions.ReadString('Tool','TextFontName','Arial');
+  tempFont.Name := iniOptions.ReadString('Tool','TextFontName','');
   tempFont.Size := iniOptions.ReadInteger('Tool','TextFontSize',10);
   fontStyle := [];
   if iniOptions.ReadBool('Tool','TextFontBold',False) then fontStyle += [fsBold];

+ 1 - 1
lazpaintcontrols/lcvectortextshapes.pas

@@ -1127,7 +1127,7 @@ end;
 
 class function TTextShape.DefaultFontName: string;
 begin
-  result := {$IFDEF WINDOWS}'Arial'{$ELSE}{$IFDEF DARWIN}'Helvetica'{$ELSE}'FreeSans'{$ENDIF}{$ENDIF};
+  result := {$IFDEF WINDOWS}'Arial'{$ELSE}{$IFDEF DARWIN}'Helvetica'{$ELSE}'Liberation Sans'{$ENDIF}{$ENDIF};
 end;
 
 class function TTextShape.DefaultFontEmHeight: single;