diff semiconginev2/resources.nim @ 1236:176383220123

add: first font-rendering test
author sam <sam@basx.dev>
date Sat, 20 Jul 2024 17:45:44 +0700
parents 5dcb503ef0c0
children e8b3dc80e48e
line wrap: on
line diff
--- a/semiconginev2/resources.nim	Sat Jul 20 15:45:02 2024 +0700
+++ b/semiconginev2/resources.nim	Sat Jul 20 17:45:44 2024 +0700
@@ -156,19 +156,6 @@
 proc LoadConfig*(path: string, package = DEFAULT_PACKAGE): Config =
   path.loadResource_intern(package = package).loadConfig(filename = path)
 
-proc LoadFont*(
-  path: string,
-  name = "",
-  lineHeightPixels = 80'f32,
-  additional_codepoints: openArray[Rune] = [],
-  charset = ASCII_CHARSET,
-  package = DEFAULT_PACKAGE
-): Font =
-  var thename = name
-  if thename == "":
-    thename = path.splitFile().name
-  loadResource_intern(path, package = package).ReadTrueType(name, charset & additional_codepoints.toSeq, lineHeightPixels)
-
 proc LoadMeshes*(path: string, defaultMaterial: MaterialType, package = DEFAULT_PACKAGE): seq[MeshTree] =
   loadResource_intern(path, package = package).ReadglTF(defaultMaterial)