Forum > Carbon
[SOLVED] fpReport designer on Mac OSX
(1/1)
xinyiman:
I installed trunk version on lazarus and i installed fpreport package. All ok, but when run designer project and add a page header and in this section add a note, the program crash because not found LiberationSans font. I change CreateForm in this mode
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TFPReportDesignerForm.FormCreate(Sender: TObject); var F : Text; i : Integer; begin DesignOptions:=AllReportDesignOptions; if PaperManager.PaperCount=0 then PaperManager.RegisterStandardSizes; if gTTFontCache.SearchPath.Count=0 then begin {$IFDEF UNIX} {$IFDEF DARWIN} gTTFontCache.SearchPath.Add(ExtractFilePath(ParamStr(0))+'../../../../demos/fonts/'); gTTFontCache.SearchPath.Add(GetUserDir + 'Library/Fonts/'); gTTFontCache.SearchPath.Add('/Library/Fonts/'); gTTFontCache.SearchPath.Add('/System/Library/Fonts/'); gTTFontCache.SearchPath.Add('/System/Library/Fonts/'); {$ELSE} 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} {$ENDIF} end; if (gTTFontCache.Count=0) then gTTFontCache.ReadStandardFonts; {$IFNDEF WINDOWS} AssignFile(F,'/tmp/fonts.txt'); Rewrite(F); For I:=0 to gTTFontCache.Count-1 do Writeln(F,I,' ',gTTFontCache.Items[i].PostScriptName,' : ',gTTFontCache.Items[i].FamilyName,' : ',gTTFontCache.Items[i].HumanFriendlyName); CloseFile(F); {$ENDIF} FDataParent:=TComponent.Create(nil); FreeAndNil(TSDesign); // Remove design-time added page FReportDesignData:=TDesignReportDataManager.Create(Self); SetBandActionTags; FCustomStartIndex:=Madd.Count; AddCustomElements; // DEMO{$IFDEF USEDEMOREPORT} CreateDemoReport; CreateReportData;{$ENDIF}// END OF DEMO SetFileCaption(''); FOI.OnSelectElement:=@DoSelectComponent; FOI.OnModified:=@DoSelectionModifiedByOI; MRUMenuManager1 := TMRUMenuManager.Create(self); with MRUMenuManager1 do begin IniFileName := ChangeFileExt(ParamStr(0), '.ini'); MenuItem := MIRecent; PopupMenu := PMRecent; MaxItemLength := 80; MenuCaptionMask := '(%d) %s'; OnRecentFile := @MRUMenuManager1RecentFile; LoadRecentFilesFromIni; maxRecent := 15; end;end;
but crash always. Suggestion?
xinyiman:
Fixed, it was easier than I thought. Just go to the sample fonts in the demo folder. Double click and tell them to install the font.
valdir.marcos:
--- Quote from: xinyiman on August 09, 2018, 10:56:24 am ---Fixed, it was easier than I thought. Just go to the sample fonts in the demo folder. Double click and tell them to install the font.
--- End quote ---
What will hapen when your application land on an end user Mac OSX computer?
xinyiman:
I do not know but I think I'll have to install the fonts by hand. However, these days I will do other tests and update you.
af0815:
The best idea is to create a report using one of th system standardfont.
Navigation
[0] Message Index