//text run holds harfbuz datas, and prevent recreating them multiple times for the same line of text.
/**
- * @brief
+ * @brief Create a new text run.
*
* @param ctx a valid vkvg @ref context
- * @param text
+ * @param text Null terminated utf8 string.
* @return VkvgText
*/
vkvg_public
VkvgText vkvg_text_run_create (VkvgContext ctx, const char* text);
/**
- * @brief
+ * @brief Create a new text run for a non null terminated string.
*
- * @param textRun
+ * @param ctx a valid vkvg @ref context
+ * @param text non null terminated utf8 string.
+ * @param length glyphs count, not to be confused with byte length.
+ * @return VkvgText
+ */
+vkvg_public
+VkvgText vkvg_text_run_create_with_length (VkvgContext ctx, const char* text, uint32_t length)
+/**
+ * @brief Release ressources holded by the text run.
+ *
+ * @param VkvgtextRun A valid VkvgText pointer.
*/
vkvg_public
void vkvg_text_run_destroy (VkvgText textRun);
_font_cache_create_text_run(ctx, text, -1, tr);
return tr;
}
-VkvgText vkvg_text_run_create2 (VkvgContext ctx, const char* text, uint32_t length) {
+VkvgText vkvg_text_run_create_with_length (VkvgContext ctx, const char* text, uint32_t length) {
if (ctx->status)
return NULL;
VkvgText tr = (vkvg_text_run_t*)calloc(1, sizeof(vkvg_text_run_t));