aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2025-06-20 08:38:29 +0100
committergingerBill <bill@gingerbill.org>2025-06-20 08:38:53 +0100
commitc056fb75127739f7f32b0226bbe0607c4fe63b9d (patch)
tree242f6f2116c46fa9d0e29c82a0ec4d13b1b00f84 /vendor
parent61edcdbfc5baeb8a2259d9a4a11b73d548bacb62 (diff)
Update procs
Diffstat (limited to 'vendor')
-rw-r--r--vendor/kb_text_shape/kb_text_shape_procs.odin29
-rw-r--r--vendor/kb_text_shape/src/kb_text_shape.h4
2 files changed, 20 insertions, 13 deletions
diff --git a/vendor/kb_text_shape/kb_text_shape_procs.odin b/vendor/kb_text_shape/kb_text_shape_procs.odin
index c320b2fdf..342be282c 100644
--- a/vendor/kb_text_shape/kb_text_shape_procs.odin
+++ b/vendor/kb_text_shape/kb_text_shape_procs.odin
@@ -1,21 +1,28 @@
package vendor_kb_text_shape
+when ODIN_OS == .Windows {
+ foreign import lib {
+ "lib/kb_text_shape.lib",
+ }
+} else {
+ foreign import lib {
+ "kb_text_shape.a"
+ }
+}
+
import "core:c"
#assert(size_of(c.int) == size_of(b32))
-#assert(size_of(u32) == size_of(b32))
-
-TEXT_SHAPE_NO_CRT :: #config(KB_TEXT_SHAPE_NO_CRT, false)
+#assert(size_of(u32) == size_of(b32))
@(default_calling_convention="c", link_prefix="kbts_")
-foreign {
- when !TEXT_SHAPE_NO_CRT {
- FontFromFile :: proc(FileName: cstring) -> font ---
- FreeFont :: proc(Font: ^font) ---
- CreateShapeState :: proc(Font: ^font) -> ^shape_state ---
- FreeShapeState :: proc(State: ^shape_state) ---
- }
-
+foreign lib {
+ // when !TEXT_SHAPE_NO_CRT {
+ FontFromFile :: proc(FileName: cstring) -> font ---
+ FreeFont :: proc(Font: ^font) ---
+ CreateShapeState :: proc(Font: ^font) -> ^shape_state ---
+ FreeShapeState :: proc(State: ^shape_state) ---
+ // }
FontIsValid :: proc(Font: ^font) -> int ---
ReadFontHeader :: proc(Font: ^font, Data: rawptr, Size: un) -> un ---
diff --git a/vendor/kb_text_shape/src/kb_text_shape.h b/vendor/kb_text_shape/src/kb_text_shape.h
index cee82f6da..43949fecf 100644
--- a/vendor/kb_text_shape/src/kb_text_shape.h
+++ b/vendor/kb_text_shape/src/kb_text_shape.h
@@ -22279,8 +22279,8 @@ KBTS_EXPORT kbts_decode kbts_DecodeUtf8(const char *Utf8, size_t Length)
FollowupCharacterCount = 3;
Result.Codepoint = First & 7;
Result.Valid = 1;
- }
- break;
+
+} break;
}
if(Length > FollowupCharacterCount)