Skip to content

Add a way to specify text style in text codes, such as bold or italic #349

@RandyGaul

Description

@RandyGaul

As per discord discussion, so far this made a lot of sense:

cf_text_effect_set_font(const char* effect_name, const char* font);

We can add a font field to the internal effect that gets registered:

struct CF_TextEffectDefinition {
  const char* font_override;
  CF_TextEffectFn fn;
}

For a particular effect that has not been registered, we can just auto-register a stub function pointer to get the text code working. Example use:

cf_text_effect_set_font("b", "calibri bold");

// ...

cf_draw_text("<b>bold</b>", ...);

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions