CosmosTTF 2.0.0
See the version list below for details.
dotnet add package CosmosTTF --version 2.0.0
NuGet\Install-Package CosmosTTF -Version 2.0.0
<PackageReference Include="CosmosTTF" Version="2.0.0" />
paket add CosmosTTF --version 2.0.0
#r "nuget: CosmosTTF, 2.0.0"
// Install CosmosTTF as a Cake Addin #addin nuget:?package=CosmosTTF&version=2.0.0 // Install CosmosTTF as a Cake Tool #tool nuget:?package=CosmosTTF&version=2.0.0
CosmosTTF
Fast TrueType Font rendering in Cosmos
Note: Only use the main branch. The other branches will not work as of now.
How to use
It is very easy to use this library. Add it to your project (currently, you will have to manually build it yourself, but I will publish this on NuGet soon). Then, you can register a font using TTFManager.RegisterFont(string name, byte[] rawFontData)
where rawFontData contains the complete TTF file as a byte array. Then, you can start using the Canvas extension method Canvas.DrawStringTTF(Pen pen, string text, string fontName, float px, Point point, float spacingMultiplier)
. Please note that spacingMultiplier does nothing as of now.
This project is powered by a slightly modified version of LunarFonts by Relfos!
Some fonts are not working! How to fix?
Sadly, the library used is quite outdated and due to the complexity of TTF rendering, its unlikely that I can change that.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Cosmos.Debug.Kernel (>= 0.1.0-localbuild20240122083735)
- Cosmos.System2 (>= 0.1.0-localbuild20240122083735)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CosmosTTF:
Package | Downloads |
---|---|
com.Samma.forgium
boost your CosmosOS browser with Forgium, The best Html + Css 2/3 Renderer for cosmos yet. |
GitHub repositories
This package is not used by any popular GitHub repositories.