Core: registro de metadados de blocos (tb_meta) + testes; metadados declarados nas libraries
This commit is contained in:
1 parent
22ae18f508
commit
036162280d
14 files changed
+397
-2
No files matched your search
@@ -363,6 +363,20 @@ static bool opentype_init(TinyBlocks* rt, TinyBlocks_LibraryBlock* lib) {
|
||||
};
|
||||
tb_library_set_category(lib, &cat);
|
||||
|
||||
/* Metadados dos blocos (tooltip do editor: Alt + hover). */
|
||||
TB_BLOCK_META("OpenType.Load", "eval_load",
|
||||
"Carrega uma fonte OpenType/TrueType");
|
||||
TB_BLOCK_META("OpenType.UnitsPerEm", "eval_upem",
|
||||
"Unidades por em da fonte");
|
||||
TB_BLOCK_META("OpenType.GlyphCount", "eval_glyphs",
|
||||
"Numero de glifos da fonte");
|
||||
TB_BLOCK_META("OpenType.Advance", "eval_advance",
|
||||
"Largura em pixels de um texto");
|
||||
TB_BLOCK_META("OpenType.Outline", "eval_outline",
|
||||
"Contornos de um caractere (pontos JSON)");
|
||||
TB_BLOCK_META("OpenType.Render", "eval_render",
|
||||
"Rasteriza um texto numa imagem");
|
||||
|
||||
static const TinyBlocks_SlotDesc load_in[] = {{"caminho", TB_VALUE_TEXT}};
|
||||
static const TinyBlocks_SlotDesc font_in[] = {{"fonte", TB_VALUE_REAL}};
|
||||
static const TinyBlocks_SlotDesc adv_in[] = {{"fonte", TB_VALUE_REAL}, {"texto", TB_VALUE_TEXT}, {"tamanho", TB_VALUE_REAL}};
|
||||
|
||||
Reference in new issue
Block a user