SDF font WIP
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ImGui.NET" Version="1.89.4" />
|
<PackageReference Include="ImGui.NET" Version="1.89.4" />
|
||||||
<PackageReference Include="Raylib-cs" Version="4.2.0.1" />
|
<PackageReference Include="Raylib-cs" Version="4.2.0.1" />
|
||||||
|
<PackageReference Include="SharpFont" Version="4.0.1" />
|
||||||
<PackageReference Include="Silk.NET" Version="2.17.0" />
|
<PackageReference Include="Silk.NET" Version="2.17.0" />
|
||||||
<PackageReference Include="Silk.NET.WebGPU" Version="2.17.0" />
|
<PackageReference Include="Silk.NET.WebGPU" Version="2.17.0" />
|
||||||
<PackageReference Include="StbImageSharp" Version="2.27.13" />
|
<PackageReference Include="StbImageSharp" Version="2.27.13" />
|
||||||
|
|||||||
@@ -120,6 +120,11 @@ namespace DaggerFramework.Rendering
|
|||||||
_glfw.SwapBuffers(_windowHandle);
|
_glfw.SwapBuffers(_windowHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void DrawSdfText(Vector2 position, string text, int fontSize, Color color)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
private GL _gl;
|
private GL _gl;
|
||||||
private Glfw _glfw;
|
private Glfw _glfw;
|
||||||
private unsafe WindowHandle* _windowHandle;
|
private unsafe WindowHandle* _windowHandle;
|
||||||
|
|||||||
@@ -123,6 +123,11 @@ namespace DaggerFramework.Rendering
|
|||||||
Raylib.DrawText(text, (int)position.X, (int)position.Y, fontSize, SystemColorToRaylibColor(color));
|
Raylib.DrawText(text, (int)position.X, (int)position.Y, fontSize, SystemColorToRaylibColor(color));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void DrawSdfText(Vector2 position, string text, int fontSize, System.Drawing.Color color)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public override void Initialize(RendererSettings settings)
|
public override void Initialize(RendererSettings settings)
|
||||||
{
|
{
|
||||||
ConfigFlags flags = 0;
|
ConfigFlags flags = 0;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ namespace DaggerFramework.Rendering
|
|||||||
public abstract void DrawCircle(float radius, Color color);
|
public abstract void DrawCircle(float radius, Color color);
|
||||||
public abstract void DrawRectangle(Vector2 size, Color color);
|
public abstract void DrawRectangle(Vector2 size, Color color);
|
||||||
public abstract void DrawDebugText(Vector2 position, string text, int fontSize, Color color);
|
public abstract void DrawDebugText(Vector2 position, string text, int fontSize, Color color);
|
||||||
|
public abstract void DrawSdfText(Vector2 position, string text, int fontSize, Color color);
|
||||||
public abstract void DrawTexture(int id, Color tint);
|
public abstract void DrawTexture(int id, Color tint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
using SharpFont;
|
||||||
|
|
||||||
namespace DaggerFramework;
|
namespace DaggerFramework;
|
||||||
|
|
||||||
public class FontLoader : ResourceLoader<Font>
|
public class FontLoader : ResourceLoader<Font>
|
||||||
{
|
{
|
||||||
public override Font Load(string path)
|
public override Font Load(string path)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
return default;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
TestGame/Resources/fonts/Inter-Regular.ttf
Normal file
BIN
TestGame/Resources/fonts/Inter-Regular.ttf
Normal file
Binary file not shown.
Reference in New Issue
Block a user