I think there ara som issues with the fonts.

frmreportdesignermain.pp around line 395

  if gTTFontCache.SearchPath.Count=0 then
    begin
    {$IFDEF UNIX}
gTTFontCache.SearchPath.Add(ExtractFilePath(ParamStr(0))+'../demos/fonts/');
    gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/ubuntu-font-family/');
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/dejavu/');
    {$ENDIF}
    end;
  if (gTTFontCache.Count=0) then
    gTTFontCache.BuildFontCache;  //  calls directly to fpTTF

in fpTTF

procedure TFPFontCacheList.BuildFontCache;
var
  lPath: String;
  i: integer;
begin
  if FSearchPath.Count < 1 then
raise ETTF.Create(rsNoSearchPathDefined); // here is the exception raised

I think in windows is no searchpath definded by default. The lines in should: because its also true for windows.

  if gTTFontCache.SearchPath.Count=0 then
    begin
gTTFontCache.SearchPath.Add(ExtractFilePath(ParamStr(0))+'../demos/fonts/');
    gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
    {$IFDEF UNIX}
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/ubuntu-font-family/');
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/dejavu/');
    {$ENDIF}
    end;

---------------------------------

If i say create a new report, another issue is, the DPI settings in Ruler are not initialised or set. So you get un runtimeerror here

procedure TDrawRuler.RecalcParams;
var I:Integer;
begin
  FPPU:=PixelsPerUnit(DPI,FUnits);    // DPI is zero
FMajorTicks:=(DPI/FPPU); //<- FFPPU is zero -> divison by zero!
  I:=Trunc(FMajorTicks);
  case I of

Fix:

constructor TDrawRuler.Create(ACanvas: TCanvas);
begin
  FCanvas:=ACanvas;
  FFont:=TFont.Create;
  Color:=clWhite;
  FTickColor:=cldkGray;
  FType:=rtTop;
  FUnits:=ruCm;
  FZeroOffset:=0;
  FDPI:=96;        //<--- should be an basic value
  RecalcParams;
end;


Andreas

-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to