Grand
08-31-2012, 11:54 PM
hi I have this problem loading fonts.. for some reason this debug code shows always the same looking font:
program new;
function ShowFont(name:String): Boolean;
var
bitmap:Integer;
idname:String;
Font:TFont;
success:Boolean;
begin
idname := 'test ' + name;
Font := TFont.Create;
Font.Name := idname;
Font.Size := 10;
Font.Style := [];
success := LoadSystemFont(Font,idname);
bitmap := BitmapFromText('Font: ' + name , idname);
DisplayDebugImgWindow(250,50);
ClearDebugImg;
DrawBitmapDebugImg(bitmap);
FreeBitmap(bitmap);
Font.free;
end;
begin
// TEST............
ShowFont('Kokila');
wait(2000);
ShowFont('Courier New');
wait(2000);
end.
font always display exactly same looking... whats wrong?
ty
program new;
function ShowFont(name:String): Boolean;
var
bitmap:Integer;
idname:String;
Font:TFont;
success:Boolean;
begin
idname := 'test ' + name;
Font := TFont.Create;
Font.Name := idname;
Font.Size := 10;
Font.Style := [];
success := LoadSystemFont(Font,idname);
bitmap := BitmapFromText('Font: ' + name , idname);
DisplayDebugImgWindow(250,50);
ClearDebugImg;
DrawBitmapDebugImg(bitmap);
FreeBitmap(bitmap);
Font.free;
end;
begin
// TEST............
ShowFont('Kokila');
wait(2000);
ShowFont('Courier New');
wait(2000);
end.
font always display exactly same looking... whats wrong?
ty