Fonts in Graphics mode 
Author Message
 Fonts in Graphics mode

        I find that the standard font in TP 7.0 appears too small for my SVGA
screen.  Is there a way to make the font appear bigger or force a
smaller resolution?

unit display;

Interface

 uses Date, Graph;

 const
   Directory = 'D:\TP\BGI';

 var
   Driver, Mode : Integer;

Procedure display_menu;

{ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - }

Implementation

Procedure display_menu;

 var
   Year, Month, Day, DayOfWeek   : String;
   Date, Size, MaxX, MaxY : String;

 Begin

   Get_Date(Year, Month, Day, DayOfWeek);

   Initgraph (Driver, Mode, Directory);

   SetFillStyle (SolidFill, Blue);
   Bar (0, 10, GetMaxX, GetMaxY);

   SetFillStyle (SolidFill, 10);
   Bar (0, 0, GetMaxX, 10);

   SetColor (Blue);

   Date := Concat('       ', DayOfWeek, ', ', Day, ' ', Month, ' ',
Year);

   OutTextXY(0,2, ' Keith Electronique        Inventory Database'+
Date);

{
   Str(GetMaxX :4, MaxX);
   Str(GetMaxY :4, MaxY);
   SetColor (LightGreen);
   Size := Concat(MaxX, ' X', MaxY);
   OutTextXY(10,50, +Size);

Quote:
}

   SetColor (LightGreen);
   OutTextXY(200,100, '[L]ist Items in Inventory');
   OutTextXY(200,112, '[P]rint Inventory List');
   OutTextXY(200,124, '[A]dd an Item');
   OutTextXY(200,136, '[D]elete an Item');
   OutTextXY(200,148, '[S]earch for an Item');
   OutTextXY(200,172, '[Q]uit');

   Readln;

  End;
End.



Wed, 18 Jun 1902 08:00:00 GMT  
 Fonts in Graphics mode

Quote:
>        I find that the standard font in TP 7.0 appears too small for my SVGA
>screen.  Is there a way to make the font appear bigger or force a
>smaller resolution?

For forcing a smaller resolution, you can do this by changing your graphics
initialization code (which I didn't notice here).

For making the font bigger, you can scale it with the SetTextStyle
procedure:

SetTextStyle (DefaultFont, HorizDir, newsize);

The largest newsize value is 10, and the smallest is 1 (normal size).  All
this does is scale the font by a factor.  For 2, the 8x8 font becomes 16x16,
for 3, it becomes 24x24, etc.  It's not that bad for the external stroked
fonts, but after you scale the built in font up a few times, it looks
terribly blocky.

Quote:
><snip>

--
Scott F. Earnest           | We now return you to our regularly scheduled



Wed, 18 Jun 1902 08:00:00 GMT  
 Fonts in Graphics mode

Quote:

>    I find that the standard font in TP 7.0 appears too small for my SVGA
>screen.  Is there a way to make the font appear bigger or force a
>smaller resolution?

>unit display;

>Interface

> uses Date, Graph;

> const
>   Directory = 'D:\TP\BGI';

> var
>   Driver, Mode : Integer;

>Procedure display_menu;

>{ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>- - }

>Implementation

>Procedure display_menu;

> var
>   Year, Month, Day, DayOfWeek   : String;
>   Date, Size, MaxX, MaxY : String;

> Begin

>   Get_Date(Year, Month, Day, DayOfWeek);

>   Initgraph (Driver, Mode, Directory);

>   SetFillStyle (SolidFill, Blue);
>   Bar (0, 10, GetMaxX, GetMaxY);

>   SetFillStyle (SolidFill, 10);
>   Bar (0, 0, GetMaxX, 10);

>   SetColor (Blue);

>   Date := Concat('       ', DayOfWeek, ', ', Day, ' ', Month, ' ',
>Year);

>   OutTextXY(0,2, ' Keith Electronique        Inventory Database'+
>Date);

>{
>   Str(GetMaxX :4, MaxX);
>   Str(GetMaxY :4, MaxY);
>   SetColor (LightGreen);
>   Size := Concat(MaxX, ' X', MaxY);
>   OutTextXY(10,50, +Size);
>}
>   SetColor (LightGreen);
>   OutTextXY(200,100, '[L]ist Items in Inventory');
>   OutTextXY(200,112, '[P]rint Inventory List');
>   OutTextXY(200,124, '[A]dd an Item');
>   OutTextXY(200,136, '[D]elete an Item');
>   OutTextXY(200,148, '[S]earch for an Item');
>   OutTextXY(200,172, '[Q]uit');

>   Readln;

>  End;
>End.

There are several graphic fonts in TP search for files called *.CHR

code like

settextstyle(sometypefont,horzontal/vertical,size)



Wed, 18 Jun 1902 08:00:00 GMT  
 Fonts in Graphics mode
How about SetUserCharSize?

--

"The only true, everlasting inertial frame is the one
 in which all bumps happen."

James E. Taylor
Department of Physics & Astronomy
University of Manchester



Web page   : http://www.compsoc.man.ac.uk/~surfer/index.html



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. graphics in text mode using dual fonts

2. Text mode - graphics mode conflict (Help!)

3. Text mode vs graphics mode conflict (Help!)

4. Text mode font - help!

5. Including graphic driver & font

6. DBGrid changes Font in Edit mode

7. mode 12h system fonts

8. Graphics font trouble

9. CHANGING FONT IN TEXT MODE

10. efontd11.zip Cvt *ANY* graphic font to CHR format used by BGI, P.Navato

11. Fonts in Text Mode ...

12. fonts algorithms in mode 13h

 

 
Powered by phpBB® Forum Software