Warning: include(../mainbanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 34

Warning: include(../mainbanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 34

Warning: include() [function.include]: Failed opening '../mainbanner.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/freeware/font viewer.php on line 34

Warning: include(../left.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 55

Warning: include(../left.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 55

Warning: include() [function.include]: Failed opening '../left.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/freeware/font viewer.php on line 55
Freeware with SourceCode

Font Viewer v1.0

Font Viewer used to view a sample form letters that are registered in Windows. Sometimes enough to help select the type of letter you want to use. Enhancements is that you can write a number of lines of text into a file called sample.txt and place it in the application folder. File this text will be pasted on the screen when the application is run.

The key to making font viewer is registered with all the name / type of letter that would show. To get a list of a number of letters in the name of the Windows Tscreen. Here is the syntax is:

procedure TForm1.FormCreate(Sender: TObject);
var
..
begin
..
with ListBox1 do //Listed font names
begin
Clear;
Sorted:= true;
Items:= Screen.Fonts;
end;
..
end;


After the list of font names have been collected, then we can display the font by using TRichEdit1 component.

procedure TForm1.ListBox1Click(Sender: TObject);
begin
RichEdit1.Font.Name := ListBox1.Items[ListBox1.ItemIndex];
end;

How about the examples of the letter and the sentence we want to see? What should be typing? We can prepare the first FormCreate () using the method Lines.Add ().

procedure TForm1.FormCreate(Sender: TObject);
var
F: TextFile;
s: string;
..
begin
..
with RichEdit1 do
begin
Clear;
Lines.Add('A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ');
Lines.Add('a b c d e f g h i j k l m n o p q r s t u v w x y z');
Lines.Add('0 1 2 3 4 5 6 7 8 9 ~ ! @ # $ % ^ & * ( ) + ™ © ® ¼ ½ ¾ ± € Ø ø ß Ð ç');
Lines.Add('');
if FileExists(GetCurrentDir+'\sample.txt') then
begin
AssignFile(F, GetCurrentDir+'\sample.txt');
reset(F);
repeat
Readln(F, S);
Lines.Add(s);
SeekEoln(F);
until eof(F);
CloseFile(F);
end;
end;
..
end;


Warning: include(../ulink180x90.php) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 162

Warning: include(../ulink180x90.php) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 162

Warning: include() [function.include]: Failed opening '../ulink180x90.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/freeware/font viewer.php on line 162

On the code line above allows you to display your own text from the source file name eksternla with sample.txt placed in the application folder. To retrieve and read text files using a normal operation, but before the file is checked first, or do not have any, with
Fileexists if (GetCurrentDir + '\ sample.txt') then ...

To display the visual forms of letters on the actual RichEdit1. Simply set the property on RichEdit1.

//set the font size
procedure TForm1.ListBox2Click(Sender: TObject);
var
idSize: integer;
begin
..
RichEdit1.Font.Size:= StrToInt(ListBox2.Items.Strings[idSize]);
..
end;

//set the font style that is normal, bold, italic
procedure TForm1.ListBox3Click(Sender: TObject);
begin
case ListBox3.ItemIndex of
0: RichEdit1.Font.Style:= [];
1: Richedit1.Font.Style:= [fsitalic];
2: RichEdit1.Font.Style:= [fsBold];
3: RichEdit1.Font.Style:= [fsBold, fsItalic];
end;
..
end;

and also the following

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
RichEdit1.Font.Style:= RichEdit1.Font.Style + [fsStrikeout]
else
RichEdit1.Font.Style:= RichEdit1.Font.Style - [fsStrikeout];
end;


To set the colors you can use the TcolorBox component. TColorBox itself is a combo box that lets you select colors.

//set the font color
procedure TForm1.ColorBox1Change(Sender: TObject);
begin
RichEdit1.Font.Color:= ColorBox1.Selected;
end;

Edit1 components used to determine the font size, so the fields may be filled only edit a number, if it be written with the letter will result in errors, because niai Text is converted to integer. Following the procedure served to limit the characters that can be written in the Edit1 component.

procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
// #8 is Backspace
// #13 is Enter
if not (Key in [#8, #13, '0'..'9']) then begin
ShowMessage('Invalid key');
// Discard the key
Key := #0;
end
else
if key = #13 then
begin
key:= #0;
..
end;
end;

Download font viewer here or you want to modify the source code.


Warning: include(../right.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 273

Warning: include(../right.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 273

Warning: include() [function.include]: Failed opening '../right.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/freeware/font viewer.php on line 273

Warning: include(../bottombanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 288

Warning: include(../bottombanner.htm) [function.include]: failed to open stream: No such file or directory in /home/makedata/public_html/freeware/font viewer.php on line 288

Warning: include() [function.include]: Failed opening '../bottombanner.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/makedata/public_html/freeware/font viewer.php on line 288