summaryrefslogtreecommitdiff
path: root/raylib.ads
diff options
context:
space:
mode:
authorrexim <reximkut@gmail.com>2024-03-30 07:25:23 +0700
committerrexim <reximkut@gmail.com>2024-03-30 07:25:23 +0700
commit971ca82ac5445caa62b130ec034e6e63a70ce7fe (patch)
tree06abdc6bdf6588f974f5d77342df07e997afa121 /raylib.ads
parente3ece90b9877d3b0145f7a359b91e0192567464b (diff)
Custom Font (Vollkorn)
Diffstat (limited to 'raylib.ads')
-rw-r--r--raylib.ads43
1 files changed, 42 insertions, 1 deletions
diff --git a/raylib.ads b/raylib.ads
index 74e6eac..295108c 100644
--- a/raylib.ads
+++ b/raylib.ads
@@ -7,6 +7,8 @@ package Raylib is
type Bool is new Boolean;
pragma Convention (C, Bool);
+ type Addr is mod 2 ** Standard'Address_Size;
+
procedure Init_Window(Width, Height: int; Title: in char_array)
with
Import => True,
@@ -164,6 +166,30 @@ package Raylib is
Import => True,
Convention => C,
External_Name => "DrawText";
+ type Texture2D is record
+ Id: unsigned;
+ Width: int;
+ Height: int;
+ Mipmaps: int;
+ Format: int;
+ end record
+ with Convention => C_Pass_By_Copy;
+
+ type Font is record
+ Base_Size: int;
+ Glyph_Count: int;
+ Glyph_Padding: int;
+ Texture: aliased Texture2D;
+ Rects: Addr;
+ Glyph_Info: Addr;
+ end record
+ with Convention => C_Pass_By_Copy;
+
+ procedure Draw_Text_Ex(F: Font; Text: Char_Array; Position: Vector2; Font_Size: C_Float; Spacing: C_Float; Tint: Color)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "DrawTextEx";
procedure Set_Target_FPS(Fps: int)
with
Import => True,
@@ -199,7 +225,6 @@ package Raylib is
Import => True,
Convention => C,
External_Name => "GetTime";
- type Addr is mod 2 ** Standard'Address_Size;
type Image is record
Data: Addr;
Width: int;
@@ -333,4 +358,20 @@ package Raylib is
Import => True,
Convention => C,
External_Name => "SetWindowIcon";
+
+ function Load_Font_Ex(File_Name: char_array; Font_Size: int; Codepoints: Addr; Codepoint_Count: Integer) return Font
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "LoadFontEx";
+ function Measure_Text_Ex(F: Font; Text: Char_Array; Font_Size: C_Float; Spacing: C_Float) return Vector2
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "MeasureTextEx";
+ procedure Gen_Texture_Mipmaps(T: access Texture2D)
+ with
+ Import => True,
+ Convention => C,
+ External_Name => "GenTextureMipmaps";
end Raylib;