rxi / microui

A tiny immediate-mode UI library
MIT License
3.42k stars 240 forks source link

Font Question #4

Closed MungoBerry closed 4 years ago

MungoBerry commented 5 years ago

Hi,

How can I use custom font ? How can I create my atlas.inl ?

Thank you.

rxi commented 5 years ago

The demo program and its renderer are meant only as a small example of how the library should be used. In real projects you are expected to bring your own code for rendering rectangles, icons and text. Alternatively you could use a library like nanovg for rendering.

Once you're set up you can switch fonts by changing the ctx->style->font value. This value will be passed to the resultant MU_COMMAND_TEXT commands for all subsequently rendered text.