d88-eli@nada.kth.se (Erik Liljencrantz) (07/10/89)
Trouble with Borlands new (unsupported) font files:
As I mentioned in a previous letter I can't load some of the new fonts
supplied in the BGI toolkit with Turbo Pascal 5.0. To test this further
I wrote these two programs. Turbo Pascal displays the 8x8 bitmapped font
(WRONG) while Turbo C displays the Gothic font (RIGHT). I suspect a bug
in GRAPH.TPU (from Turbo Pascal 5.0). Try it with Turbo Pascal 5.5, examine
the .CHR files or do something else... All replies welcome...
Turbo Pascal (5.0) Turbo C (2.0)
==============================================================================
USES #include <stdio.h>
Graph; #include <graphics.h>
VAR main()
G,D,Error:INTEGER; { int G,D,error;
char ch;
BEGIN
G := DETECT; G = DETECT;
InitGraph ( G, D, '' ); initgraph ( &G, &D, "" );
SetTextStyle(GOTHICFONT,HORIZDIR,4); settextstyle(GOTHIC_FONT,HORIZ_DIR,4);
Error := GraphResult; error = graphresult ();
OutTextXY(50,150,'Hello world!'); outtextxy ( 50, 150, "Hello world!" );
ReadLn; scanf ( "%c", &ch );
CloseGraph; closegraph ();
WriteLn ( 'Errorcode:', error ); printf ( "Errorcode: %d\n", error );
END. }
Replies to Please, no flames about the state of my
Erik Liljencrantz C-code, I'm a Pascal programmer...
d88-eli@nada.kth.se