Easy answer: You can not.
Outline :
I do not even want to get into the merits of why, so for the "compiler" to understand what was written, the code must be legible.
One way around this would be to create a DLL containing the "hidden" functions and release it along with the sources.
Here's how to do it from here :
Go to File|New|Other|DLL Wizard
;
Replace the font created by this:
library TestLibrary;
uses SysUtils, Classes, Dialogs;
procedure DllMessage; export;
begin
ShowMessage('Olá Mundo') ;
end;
exports DllMessage;
begin
end.
Create a new project (for testing), add a button on form (button1) and replace the source with the following:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes,
Graphics, Controls, Forms, Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject) ;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
procedure DllMessage; external 'SimpleMessageDLL.dll';
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject) ;
begin
DllMessage;
end;
end.
When you click the button, the system will call the function created in the DLL. Change the function you need and distribute the DLL next to the font stating that it is needed.